5

I type with ten fingers with my pointer fingers on "F" and "J".

This way I can type the alphabet with a QWERTZ layout fast and easy.

But many other keys are hard to reach. For example:

Pos1, End, Del, Arrow-Up/Down, Page-Up/Down, ESC, Backspace.

Is there a way to make these keys available while keeping the pointer fingers on "F" and "J"?

I am happy with "A" to "Z" and don't want to switch to a different layout (for example Colemak)

Maybe by making CapsLock a new modifier, so that (for example) CapsLock-u is arrow-up and CapsLock-n is arrow-down?

I use Ubuntu Linux.

I created a follow-up question: Hyper-key u --> Like Arrow-Up

Update

I found a great solution to it: input-remapper. See my small article Ten Flying Fingers (more comfortable touch typing)

4
  • 1
    Commenting this since it is remotely related- you can use vim-esque shortcuts in order to navigate using only the characters keys. There are many plugins available for many programs, including chrome and vscode, that mimic this behavior.
    – Lior Pollak
    Dec 17, 2021 at 14:07
  • @LiorPollak you say "there are many plugins available for many programs". I would like to solve this once at desktop-level, not again and again for every program.
    – guettli
    Dec 17, 2021 at 14:42
  • @UnKNOWn Thank you for your answer. Is your comment still relevant?
    – guettli
    Dec 19, 2021 at 10:23
  • @UnKNOWn the third level. Isn't this AltGr? In gnome-tweaks I found a way to make CapsLock the Hyper-key. Now I need a way to configure hyper-u, hyper-n ... to behave like up/down ....
    – guettli
    Dec 19, 2021 at 10:33

3 Answers 3

4
+500

from arch wiki link I followed the steps and succeeded in "Arch Linux" and "Ubuntu 20.04" OS'es for While Keeping Caps Lock key + u,h,j,n etc keys. This method allows to highlight the text with Shift+Caps+h keys as mentioned in the link.

Before proceeding, read the Precautions & Preparations link

Step 1

Edit the file /usr/share/X11/xkb/types/complete
Original Content in Ubuntu 20.04

default xkb_types "complete" {
    include "basic"
    include "mousekeys"
    include "pc"
    include "iso9995"
    include "level5"
    include "extra"
    include "numpad"
};

After Edits

default xkb_types "complete" {
    include "basic"
    include "mousekeys"
    include "pc"
    include "iso9995"
    include "level5"
    include "extra"
    include "numpad"
    
       type "CUST_CAPSLOCK" {
       modifiers= Shift+Lock; 
       map[Shift] = Level2;            //maps shift and no Lock. Shift+Alt goes here, too, because Alt isn't in modifiers.
       map[Lock] = Level3;
       map[Shift+Lock] = Level3;       //maps shift and Lock. Shift+Lock+Alt goes here, too.
       level_name[Level1]= "Base";
       level_name[Level2]= "Shift";
       level_name[Level3]= "Lock";
   };
};

Step 2

Edit the file /usr/share/X11/xkb/compat/complete

After Edits

default xkb_compatibility "complete" {
    include "basic"
    augment "iso9995"
    augment "mousekeys"
    augment "accessx(full)"
    augment "misc"
    augment "xfree86"
    augment "level5"
    augment "caps(caps_lock)"
    
       interpret Caps_Lock+AnyOfOrNone(all) {
       action= SetMods(modifiers=Lock);
   };
};

Step 3

Edit the file /usr/share/X11/xkb/symbols/us #change us with your actual symbols file.

Some of the edited content

    key <AC05> {    [     g,    G       ]   };
//  key <AC06> {    [     h,    H       ]   };
    key <AC06> {
       type= "CUST_CAPSLOCK",
       symbols[Group1]= [               h,               H,               Left],
       actions[Group1]= [      NoAction(),      NoAction(),   RedirectKey(keycode=<LEFT>, clearmods=Lock) ]
  };
    key <AC07> {    [     j,    J       ]   };
    key <AC08> {    [     k,    K       ]   };

Like wise, edit the symbol files as per your requirement. key symbols can be obtained by

xev | grep keysym command

$ xev | grep keysym
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES,
    state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES,
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
    state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,
    state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
$ 

Step 4
Run the below command to apply the changes immedeately

sudo udevadm trigger --subsystem-match=input --action=change

Source of above command is https://askubuntu.com/a/1075707/739431

5
  • Is there an easier way to make the change to these files active without logout+login?
    – guettli
    Dec 19, 2021 at 10:34
  • 1
    @guetti this command seems to work without "logout and login" sudo udevadm trigger --subsystem-match=input --action=change
    – PRATAP
    Dec 19, 2021 at 11:01
  • My preferred solution would to not modify the system files. Maybe it is possible to just set capsLock to the hyper key (via gnome-tweaks) and then modify .xmodmaprc?
    – guettli
    Dec 19, 2021 at 11:11
  • @Unkown: I created a follow-up question: askubuntu.com/questions/1382762/hype-key-u-like-pageup
    – guettli
    Dec 19, 2021 at 11:23
  • 1
    @guettli you can use this solution (from UnKNOWn's answer) without editing the original files, instead create your own new inherited layouts. I have tried inherited XKB symbols as in my answer here askubuntu.com/q/482678/26246 or from others in askubuntu.com/q/510024/26246 . for XKB types, I expected to be same way, structure is explained in previous link. This way, you can even package the new layout, and copy it into other machines.
    – user.dz
    Dec 25, 2021 at 8:59
2

To solve this kind of problem some keyboard layouts include extra layers other than those offered by shift/capslock and regular modifier keys. One example is the Neo (wikipedia; docs (in german); docs (google translated)).

Neo offers 6 layers and the movement-keys-layer you are willing is the fourth layer. (The layers are 1-lowercase, 2-uppercase, 3-special chars, 4-movements+numbers, 5-greek chars (for formulas); 6-math symbols+greek uppercase.

Just like what happens with shift that takes you from layer 1 to layer 2 (lowercase to uppercase regular text), a single keystroke to M4 keys (shown on the image, seems to be equivalent to qwertz's < and alt-gr) takes you to the fourth layer.

Neo's 4th layer:

neo keyboard layout fourth layer (image taken from official website)

It is possible to see that up-down for example are not vim like, they are one above other just regular keyboards.

Movements' key locations on neo's fourth layer:

movement key
home a
end g
del r
up e
down d
pgUp q
pgDown t
ESC z
backspace w

The first two layers are optimized for german. But since you still want to stay with qwertz layout, there is a variation, called neoquertz, where those layers 1 and 2 will be regular qwertz lowercase and uppercase respectively. This way you will feel more like home, just as you wanted.

According to their documentation, they are already included in major OS's, including Linux (install instrutions) (where it is installed as keyboard variant), but I wouldn't guarantee that they would work out of the box. - In my case (ubuntu/xfce), it wasn't necessary to apt or install anything, I had only to set configurations. When following their instructions, differently from what was stated, it only worked after a reset and only in the login screen, after login qwerty came back, so more tweaking was needed. localectl list-x11-keymap-variants only lists neo and not neo_quartz. The graphical login had slightly different keyboard behavior compared to tty1-6. Be careful about not using neo instead of neo_quertz, otherwise you will be stuck trying to type your username and password in a layout you have no clue where the positions are. And don't forget: shift together with other key types it uppercase, whereas capslock together with other key types the layer3 symbol (if you have symbols in your passwords you will need to know this).

2
  • Thank you for this answer. Unfortunately I see only "neo-querty" not "neo-quertz".
    – guettli
    Dec 17, 2021 at 12:51
  • I am in the opposite situation. kind of needing to get rid of neo-quertz. In my case localectl list-x11-keymap-variants shows only neo, but neo-quertz was accepted somehow because simply locatectl shows neo_qwertz and at least when I am logged out it is acting as a neo and as qwertz. but it is ubuntu 21.4 and xfce. so, things may differ.
    – brunoff
    Dec 20, 2021 at 3:46
1

You can edit you own keyboard mapping by editing or creating a new symbols map from an existing map in /usr/share/X11/xkb/symbols

and you can get the current value of each key on your keyboard by using the following command:

xev | grep keysym

Here is the map of adresses of each hardware keyboard key keyboard keys

good keyboarding!

3
  • Nice answer, however it does not in any way tell how one can do this.
    – vanadium
    Dec 23, 2021 at 17:24
  • @vanadium my answer is maybe incomplete but it gave some insights on how to dive into the problem. Also my answer was used another just above. because you didn't like my answer, was it necessary to downvote me? Dec 24, 2021 at 14:18
  • 1
    I very rarely downvote, but I think your answer hardly gives any insight in how things work, and gives hardly a clue at all on how to figure things out. "editing or creating a new symbol map": I think OP could tell that without your answer as well.
    – vanadium
    Dec 25, 2021 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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