I have an external BT keyboard with layout UK QWERTY (see a scan of the layout here 1) which works fine with my Ubuntu mobile devices. What I in addition want to archive are the Spanish tilded chars like áéíóñ¿¡ ...

In my FreeBSD netbook I do such configuration on the X11 level with commands like this which are fired up when the desktop comes up, here as an example for the character ñ Ñ:

# we use the Win-key to add more (esp. Spanish) letters to the keys:
xmodmap -e "keycode 0x73 =  Mode_switch"
xmodmap -e "keycode 0x39 =  n N ntilde Ntilde"

i.e. the useless key "Win" is redefined as a X11-modifier key and pressing the keys Win + n together gives just ñ.

How could I do this within the Ubuntu touch OTA-10?

Please note: we are not talking here about defining a new keyboard layout for the on-screen-keyboard, but about an exiting external bluetooth keyboard and how to define with some modifier key, characters which are not on the keyboard itself.


The keymapping for terminal-app can be defined in a file default.keytab (exact location see below). I got working nearly all the Spanish tilded chars with the add-ons to this file as attached at the end of this comment. One problem remains: there is a key on the keyboard labeled with the '?' and '/' symbols (on a QWERTY the most right key on the second row next to a Shift key). My ideas was to produce ogether with Alt the char ¿ (questionmarkdown), but I do not know how the physical key is named in QT in the file qnamespace.h from where the key-names are derived. I tried

key Slash key Question

both have no visible effect.

Note: This only works for the terminal-app and not for the Mir server, i.e. the other apps.

new lines in 'default.keytab'

# added for Spanish tilded chars
# to be placed in:
# /userdata/system-data/opt/click.ubuntu.com/com.ubuntu.terminal/0.7.190/lib/arm-linux-gnueabihf/QMLTermWidget/kb-layouts/default.keytab
key A -Alt-Shift : "a"
key A -Alt+Shift : "A"
key A +Alt-Shift : "\xc3\xa1"
key A +Alt+Shift : "\xc3\x81"
key N -Alt-Shift : "n"
key N -Alt+Shift : "N"
key N +Alt-Shift : "\xc3\xb1"
key N +Alt+Shift : "\xc3\x91"
key E -Alt-Shift : "e"
key E -Alt+Shift : "E"
key E +Alt-Shift : "\xc3\xa9"
key E +Alt+Shift : "\xc3\x89"
key I -Alt-Shift : "i"
key I -Alt+Shift : "I"
key I +Alt-Shift : "\xc3\xad"
key I +Alt+Shift : "\xc3\x8d"
key U -Alt-Shift : "u"
key U -Alt+Shift : "U"
key U +Alt-Shift : "\xc3\xba"
key U +Alt+Shift : "\xc3\x9a"
key O -Alt-Shift : "o"
key O -Alt+Shift : "O"
key O +Alt-Shift : "\xc3\xb3"
key O +Alt+Shift : "\xc3\x93"
key 1 -Alt-Shift : "1"
key 1 -Alt+Shift : "!"
key 1 +Alt-Shift : "\xc2\xa1"  # 'exclamationdown'
key 1 +Alt+Shift : "\xc2\xbf"  # 'questiondown' but gives \x1b\x21
key 2 -Alt-Shift : "2"
key 2 -Alt+Shift : "\x22"
key 2 +Alt-Shift : "\xc2\xbf"  # 'questiondown'
key 2 +Alt+Shift : "2"         # but gives \x1b\x22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.