SOLVED: Dying lshift key=> how to remap caps lock to shift, if possible please?

Due to recent relocation my 2 spare KBs are unreachable, maybe even 'till spring.

I won't bore anyone here with WHY this is important - I'll just say that for now I NEED to make this KB work better somehow.

My thought is to somehow remap a nearby key as the shift key - caps lock will be best, but if not possible then l-ctrl or the silly windoze key would make things better.

My searching showed that gnome-tweaks might do this - but all its options are locking ones.

I've tried some other remapping in the past with poor results, which I posted about here as well.

Any/all help will be hugely appreciated !!

Thanks for reading.

Have a look at this earlier posting by one of the Community's respected and very helpful members:

The other option is to look at this article (also previously mentioned on this site):

Admittedly "adjacent" to the topic, you may also wish to look at

4 Likes

Sincerest Thanks for your highly educational reply Ericmarceau !!

Eugene's thread seems a bit over-the-top for my need to just change a single key.

BC's post seems a great deal better for me & hopefully using that info I can remap caps lock to Lshift.

I'm concerned about just WHERE to place .xmodmap - I did 'whereis .xmodmap' & a ton of locations showed up !!

Looking further it seems to be placed in /home/user/, so I've tried that.

Viola !!
Problem solved.

I also remapped lshift as space just in case I screw up & use it, that way it'll either do nothing or make a space now.

Shortening this process for anyone else who may want TL:DR=>

  • Open a terminal at your home directory;
  • Run xmodmap -pke > .Xmodmap
  • Using your chosen text editor, open /home/user/.Xmodmap
  • Locate the keycodes you wish to change (I suggest making notes in a separate TXT file for 'just in case')
  • Make your changes
  • Save the file
  • In your terminal, run xmodmap .Xmodmap

Test the changed keys !!

So long as you're satisfied & if you want them that way always, go to your startup apps & add:
xkbcomp /home/user/.xkbmap ":0"
Of course editing 'user' to whatever yours may be.

Before posting my query here I did do a bunch of searching both here & openly but did NOT come across the info shared here by Ericmarceau, so maybe this thread could help someone else who is still using a tired out 20+ y/o mechanical KB !!

Thanks Again.

4 Likes