Ubuntu – Can i avoid arrow keys and use any other shortcut that might be easy to access from home keys

keyboardshortcut-keys

I'm using dvorak layout, during programming or writing, it's difficult for me to move my hands from home keys to arrows key again and again, so can I create a shortcut such as ctrl+shift+alt+h that'll alternative to left arrow key, and ctrl+shift+alt+s alternative to right arrow, accessing to arrow key distract my focus from screen and I'll have to look at the keyboard again again, sometime I even forget what was I about to write.

Best Answer

I use 3rd layer symbols and assign arrows to letters hjkl

Install gnome-tweaks tool

Inside gnome-tweaks go to Additional Layout Options and choose Caps Look as a key to choose the 3rd level.

Then open your terminal and go to /usr/share/X11/xkb/symbols/ There are all keyboard layouts store on your computer

Make a backup of your layout

cp us us_old

Modify file as root

sudo nano us

Third values in arrays are your keys:

key <AC01> {[a,A,Home]};
key <AC02> {[s,S,BackSpace]};
key <AC03> {[d,D,Delete]};
key <AC04> {[f,F,End]};
key <AC05> {[g,G]};
key <AC06> {[h,H,Left]};
key <AC07> {[j,J,Down]};
key <AC08> {[k,K,Up]};
key <AC09> {[l,L,Right]};