Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. shift Shift_L (0x32), Shift_R (0x3e)
  2. lock Caps_Lock (0x42)
  3. control Control_L (0x25), Control_R (0x69)
  4. mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
  5. mod2 Num_Lock (0x4d)
  6. mod3
  7. mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
  8. mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
  9.  
  10. ! Part 1 (since about 2006)
  11.  
  12. ! Avoid BadValue (TODO: debug why we get BadValue otherwise)
  13. clear mod1
  14. clear mod4
  15.  
  16. ! Actually, my keyboard doesn't have 0xcc/0xcd keys, thank you...
  17. keycode 0xcc = NoSymbol
  18. keycode 0xcd = NoSymbol
  19.  
  20. ! mod3 is Alt. I'm sure this is documented somewhere.
  21. ! It works that way in every program!
  22. add mod3 = Alt_L
  23. add mod3 = Alt_R
  24.  
  25. ! In addition to Alt keys, my keyboard has ... drumroll ... *Windows* keys!
  26. ! These are meta keys, say, in Windows web browsers.
  27. ! Don't take my word for it, hit F12 and type:
  28. ! onkeydown = function(e){console.log(e);}
  29. ! And, um, Alt is already taken, so obviously Meta = Windows key.
  30. ! Is that not clear to someone, or is someone just being annoying
  31. ! with all this "Alt = Meta" garbage?
  32. keycode 0x85 = Meta_L
  33. keycode 0x86 = Meta_R
  34.  
  35. ! No, mod1 is not Alt!
  36. ! In every program, mod1 is actually meta!
  37. add mod1 = Meta_L
  38. add mod1 = Meta_R
  39. remove mod1 = Alt_L
  40. remove mod1 = Alt_R
  41.  
  42.  
  43.  
  44. ! Part 2 (since about 2015)
  45. ! What is going on?? USB thinks it can just wipe my xmodmap???
  46. !
  47. ! 1. Locate xkb rulefile using
  48. !
  49. ! udevadm control --log-priority=info
  50. !
  51. !
  52. ! It will be something like
  53. !
  54. ! /lib/udev/rules.d/64-xorg-xkb.rules
  55. !
  56. !
  57. ! 2. Edit /lib/udev/rules.d/64-xorg-xkb.rules. Add:
  58. !
  59. ! RUN += "/big/usb_fix.sh"
  60. !
  61. ! and do:
  62. !
  63. ! udevadm control --reload-rules
  64. !
  65. ! note: using /big is intentional... on new Ubuntus, the system dies
  66. ! with "a start job is running..." in disk mounting. So we prevent this
  67. ! script from running ig /big is not mounted yet.
  68. !
  69. !
  70. ! 3. Create the /big/usb_fix.sh script:
  71. !
  72. ! #!/bin/sh
  73. ! echo "xmodmap ~/.Xmodmap" >> /usr/local/usb_fix.log
  74. !
  75. ! and make it executable.
  76. !
  77. !
  78. ! 4.
  79. ! mkfifo /usr/local/usb_fix.log
  80. !
  81. !
  82. ! 5.
  83. ! Create a script (e.g. named ~/bin/usb_fix_client)
  84. !
  85. ! #!/bin/sh
  86. ! yes 'cat /usr/local/usb_fix.log | sh' | sh
  87. !
  88. ! and put this in your .xinitrc.
  89.  
  90.  
  91. ! Part 3 (since about 2018)
  92. !
  93. ! Every now and then, apt-get can overwrite the xorg-xkb-rules?
  94. ! solution for now is turn off automatic updates.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement