Monday, December 19, 2016

linux - How to make Alt+Shift act like AltGr with xmodmap?


I just swapped from Windows and I was used to using Alt+Shift to type special characters such as |@#~½¬from the number row, but it only works with Alt Gr on Ubuntu. It's not in the settings either so I figured xmodmap is the way to go. But the only way to make it work I've found is by remapping every single special character, like keycode 21 = equal plus equal plus semicolon colon.


Is there any way of copying Alt Gr to Alt+Shift?


Answer



I've come to the conclusion after hours of trying that it is not possible with Autokey, xmodmap or setxkbmap to copy AltGr to Alt_L and Shift_L.



  • Autokey doesn't allow a shortcut like Alt+Shift, since it also needs another character. Alt, Shift, Control... only count as combinations with other keys and they won't work by themselves


  • xmodmap should have worked with xmodmap -e "keysym Meta_L = ISO_Level3_Shift" but it only assigns the function to Alt_L, Shift_L does something similar, typing different special characters. Besides, when this is activated, these keys will only work for that purpose (You can't do Alt+Tab etc)


  • setxkbmap should have worked too with setxkbmap -option Meta_L:ISO_Level3_Shift but it apparently does nothing. When tested with xev it does change the input key but it's something different from ISO_Level3_Shift



No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...