5

My thinkpad has got a few of its keys damaged, and I have been trying a permanent workaround for it. I tried using xmodmap which could set the F9 key to the letter "L" (small/caps based on whether or not Shift is pressed) but it couldn't persist beyond a reboot. Permanent xmodmap in Ubuntu 13.04 says that there's a different way to do this for 16.04 as xmodmap has to be manually loaded after every boot.

However, I realised that F9 could be an important function key at certain situations, so I want to set up something like AltGr+- == l and Shift+AltGr+- == L. I couldn't figure out a way to do this with the above link. Would be really helpful if someone could help me out, I'm a complete beginner. It's really tiring to click on OnBoard every single time.

scienceauror
  • 193
  • 1
  • 11

2 Answers2

3

This solved it for me : How persistently remap keys in Ubuntu 16.04?

  1. Once I made changes to xmodmap using the key codes from xev
  2. I edited .bashrc and added the line xmodmap ~/.Xmodmap.

Thanks

scienceauror
  • 193
  • 1
  • 11
0

You're probably looking for something like this: http://www.fsays.eu/Blogging/Blog/Details/23.

The /dev/uinput device in Linux allows you to create a virtual keyboard. You'll then need a piece of software to accept keystrokes from your real keyboard and turn them into these virtual keys. Googling for "/dev/uinput virtual keyboard" should get you started.