LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Attempting to create a custom keyboard layout. (https://www.linuxquestions.org/questions/linux-general-1/attempting-to-create-a-custom-keyboard-layout-4175627496/)

folatt 04-12-2018 02:11 AM

Attempting to create a custom keyboard layout.
 
https://www.linuxquestions.org/quest...ayout-1-37728/

pan64 04-12-2018 02:31 AM

probably xmodmap and/or xkeymap are the solution.

Michael Uplawski 04-12-2018 03:29 AM

Quote:

Originally Posted by pan64 (Post 5842225)
probably xmodmap and/or xkeymap are the solution.

Right.

However, when you alter a lot of the default key-maps for xmodmap, i.e. when the xmodmap.[country-code] becomes somewhat “huge”, it takes time to load it. If you need to test your new settings or for other reasons want to call xmodmap on such a configuration, it may block your input for a while. Used on system start-up, it may take a little longer than with the standard-settings.

xmodmap is great, however, when you want to alter or add only a few keys. One mapping-file that I use is just this:
Code:

! Ω and @
keycode  24 = q Q q Q at Greek_OMEGA at
! œ and Œ
keycode  32 = o O o O oe OE oe
! λ and Λ (greek_lambda)
keycode  46 = l L l L U03BB U039B U03BB 
! δ and Δ (greek_delta)
keycode  40 = d D d D U03B4 U0394 U03B4
! ω (greek_omega)
keycode  25 = w W w W U03C9
! ✅ and ✔
keycode  44 = j J j J U2705 U2714

I do not know, when the file becomes too big to be loaded swiftly nor what else can have an influence.

Ω

DavidMcCann 04-12-2018 12:19 PM

Xmodmap is ok for altering the odd key, but it doesn't always play well with the Xorg system.

If you use the command
setxkbmap -print
you can see how your keyboard driver is created. In mine, the output
xkb_symbols { include "pc+gb+gr:2+astro:3+inet(evdev)+group(shift_caps_toggle)+terminate(ctrl_alt_bksp)" };
shows that it's using 7 files from /usr/share/X11/xkb/symbols. The ones that relate to the alphanumeric parts of the keyboard are gb, gr, and astro.

You will presumably have "us" instead. Your placement of é shows how things work:
key <AC03> { [ e, E, eacute, Eacute ] };
shows that the third key (03) in the third alphanumeric row (AC) gives "e E é É" with Shift, ThirdLevelShift, and both together. So, it's quite easy to re-write these things. For example, my gb gives phonetic symbols on levels 3 and 4, while astro gives astrological ones.

Don't forget that you can also get diacritics with a Compose key (I use the Windows menu key for that). This can be customised with a ~/.XCompose file. Thus mine includes
<Multi_key> <t> <l> : "ƛ" U019B # Latin small LAMDA with stroke
<Multi_key> <comma> <s> : "ș" U0219 # Latin small S with comma below

As for the flag, you can customise that
https://winaero.com/blog/custom-flag...yboard-layout/
If you create your own flags, you can convert png or jpg to svg with Image Magic's convert or mogrify commands.

folatt 04-13-2018 01:44 AM

Thanks guys!

It looks like I'm going to have to talk to this Steffen Bruentjen guy, see if I can collaborate a bit with him with our somewhat similar goals.

I will keep things updated.

folatt 04-21-2018 06:41 AM

https://www.linuxquestions.org/quest...ayout-1-37727/


All times are GMT -5. The time now is 08:11 PM.