BT keyboard config for Spanish tilded chars like á í ó ñ in kgx app

I’m used to use the below pictured BT keyboard/touchpad combination which works fine with my L5. It connects with the L5 on sinple power-on (when BT is enabled in the L5) and the only thing I have todo is use Fn + D (the D key labeled with ios in blue) to get the correct keycodes. It works fine for A usesSCII.

What I want to have are Spanish tilded chars in UTF-8 coding in the app kgx. On my FreeBSD laptop running KD5 with an Xorg server and the urxvt UTF-8 terminal app, I do this with such xmodmap commands:

/usr/local/bin/setxkbmap -model pc105 \
          -layout de \
          -option "altwin:swap_alt_win"   \
          -option "lv3:ralt_switch"

# we use the Win-key to add more (esp. Spanish) letters to the keys:
#
# Spanish tilded chars (use Mode_switch + char)
#
# exit
xmodmap -e "keycode 10 =  1 exclam exclamdown onesuperior"
xmodmap -e "keycode 20 =  questiondown question backslash ssharp"
xmodmap -e "keycode 26 =  e E eacute Eacute"
xmodmap -e "keycode 30 =  u U uacute Uacute"
...

The Modifier key is the useless Windows-key.

How could I do this for the app kgx?

1 Like

I found a solution an documented it in my folder as:

53 Spanish tilded UTF-8 chars in a BT ASCII terminal

   Using a QUERTY BT terminal which only has ASCII chars we can configure
   Spanish tilded UTF-8 chars in a terminal urxvt the following way:

   copy the desktop entry to .local:
   
   cp /usr/share/applications/rxvt-unicode.desktop ~/.local/share/applications/

   and modify it to start a shell script /home/purism/URxvt.sh which in turn
   starts the terminal with a bigger font as

   urxvt -ls -fn "xft:Bitstream Vera Sans Mono:pixelsize=16"

   The essential for the keyboard mapping is in /home/purism/.Xdefaults as:

   ! settings for urxvt
   URxvt.keysym.A-a: á
   URxvt.keysym.A-e: é
   URxvt.keysym.A-i: í
   URxvt.keysym.A-o: ó
   URxvt.keysym.A-n: ñ
   URxvt.keysym.A-A: Á
   URxvt.keysym.A-E: É
   URxvt.keysym.A-I: Í
   URxvt.keysym.A-O: Ó
   URxvt.keysym.A-1: ¡
   URxvt.keysym.A-2: ¿
   ! the #-sign is on the BT keyboard, but gives ESC-3
   URxvt.keysym.E-3: #

That’s it and with Alt_L + n we get ñ

1 Like

My go-to tool for keyboard customization (e.g., with weird keyboards, that have different from “standard” mapping), is keyd, which works with wayland and should work with kgx on Phosh: GitHub - rvaiya/keyd: A key remapping daemon for linux.

I think it could work for your use case, too.

2 Likes