On Sun, Dec 03, 2023 at 08:22:04PM +0400, norayr chilingarian wrote:
> ---
> svkbd.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/svkbd.c b/svkbd.c
> index e4dbd15..cce2463 100644
> --- a/svkbd.c
> +++ b/svkbd.c
> _AT_@ -481,9 +481,18 @@ press(Key *k, KeySym buttonmod)
> int
> tmp_remap(KeySym keysym)
> {
> - XChangeKeyboardMapping(dpy, tmp_keycode, 1, &keysym, 1);
> + /* map lower and upper case of keysym to the temporary keycode */
> + KeySym syms[2];
> + XConvertCase(keysym, &syms[0], &syms[1]);
> +
> + /* if keysym is capital letter then swap upper and lower case */
> + if (keysym == syms[1])
> + syms[1] = syms[0], syms[0] = keysym;
> +
> + XChangeKeyboardMapping(dpy, tmp_keycode, syms[0] == syms[1] ? 1 : 2, syms, 1);
> XSync(dpy, False);
>
> + printdbg("Temorary map keysym %ld (%ld, %ld) to keycode %d\n", keysym, syms[0], syms[1], tmp_keycode);
> return tmp_keycode;
> }
>
> --
> 2.41.0
>
>
Thanks for the patch,
I'm not a svkbd user right now and also not Armenian.
Can anyone test this and report if it makes sense?
Thanks,
--
Kind regards,
Hiltjo
Received on Sun Dec 03 2023 - 21:48:09 CET