Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Make arrow-up/down, Pos1, End, Del … more easy

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:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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: Hype-key u –> Like PageUp

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading