Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! Part 1 (since about 2006)
- ! Avoid BadValue (TODO: debug why we get BadValue otherwise)
- clear mod1
- clear mod4
- ! Actually, my keyboard doesn't have 0xcc/0xcd keys, thank you...
- keycode 0xcc = NoSymbol
- keycode 0xcd = NoSymbol
- ! mod3 is Alt. I'm sure this is documented somewhere.
- ! It works that way in every program!
- add mod3 = Alt_L
- add mod3 = Alt_R
- ! In addition to Alt keys, my keyboard has ... drumroll ... *Windows* keys!
- ! These are meta keys, say, in Windows web browsers.
- ! Don't take my word for it, hit F12 and type:
- ! onkeydown = function(e){console.log(e);}
- ! And, um, Alt is already taken, so obviously Meta = Windows key.
- ! Is that not clear to someone, or is someone just being annoying
- ! with all this "Alt = Meta" garbage?
- keycode 0x85 = Meta_L
- keycode 0x86 = Meta_R
- ! No, mod1 is not Alt!
- ! In every program, mod1 is actually meta!
- add mod1 = Meta_L
- add mod1 = Meta_R
- remove mod1 = Alt_L
- remove mod1 = Alt_R
- ! Part 2 (since about 2015)
- ! What is going on?? USB thinks it can just wipe my xmodmap???
- !
- ! 1. Locate xkb rulefile using
- !
- ! udevadm control --log-priority=info
- !
- !
- ! It will be something like
- !
- ! /lib/udev/rules.d/64-xorg-xkb.rules
- !
- !
- ! 2. Edit /lib/udev/rules.d/64-xorg-xkb.rules. Add:
- !
- ! RUN += "/big/usb_fix.sh"
- !
- ! and do:
- !
- ! udevadm control --reload-rules
- !
- ! note: using /big is intentional... on new Ubuntus, the system dies
- ! with "a start job is running..." in disk mounting. So we prevent this
- ! script from running ig /big is not mounted yet.
- !
- !
- ! 3. Create the /big/usb_fix.sh script:
- !
- ! #!/bin/sh
- ! echo "xmodmap ~/.Xmodmap" >> /usr/local/usb_fix.log
- !
- ! and make it executable.
- !
- !
- ! 4.
- ! mkfifo /usr/local/usb_fix.log
- !
- !
- ! 5.
- ! Create a script (e.g. named ~/bin/usb_fix_client)
- !
- ! #!/bin/sh
- ! yes 'cat /usr/local/usb_fix.log | sh' | sh
- !
- ! and put this in your .xinitrc.
- ! Part 3 (since about 2018)
- !
- ! Every now and then, apt-get can overwrite the xorg-xkb-rules?
- ! solution for now is turn off automatic updates.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement