Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 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. ! Oh, and Meta = Windows also used to work out of the box in
  31. ! FreeBSD distros back in pre-linux days, so maybe we shouldn't
  32. ! change things that aren't broken?
  33. ! Is that not clear to someone, or is someone just being annoying
  34. ! with all this "Alt = Meta" garbage?
  35. keycode 0x85 = Meta_L
  36. keycode 0x86 = Meta_R
  37.  
  38. ! No, mod1 is not Alt!
  39. ! In every program, mod1 is actually meta!
  40. add mod1 = Meta_L
  41. add mod1 = Meta_R
  42. remove mod1 = Alt_L
  43. remove mod1 = Alt_R
  44.  
  45.  
  46.  
  47. ! Part 2 (since about 2015)
  48. ! What is going on?? USB thinks it can just wipe my xmodmap???
  49. !
  50. ! 1. Locate xkb rulefile using
  51. !
  52. ! udevadm control --log-priority=info
  53. !
  54. !
  55. ! It will be something like
  56. !
  57. ! /lib/udev/rules.d/64-xorg-xkb.rules
  58. !
  59. !
  60. ! 2. Edit /lib/udev/rules.d/64-xorg-xkb.rules. Add:
  61. !
  62. ! RUN += "/big/usb_fix.sh"
  63. !
  64. ! and do:
  65. !
  66. ! udevadm control --reload-rules
  67. !
  68. ! note: using /big is intentional... on new Ubuntus, the system dies
  69. ! with "a start job is running..." in disk mounting. So we prevent this
  70. ! script from running ig /big is not mounted yet.
  71. !
  72. !
  73. ! 3. Create the /big/usb_fix.sh script:
  74. !
  75. ! #!/bin/sh
  76. ! echo "xmodmap ~/.Xmodmap" >> /usr/local/usb_fix.log
  77. !
  78. ! and make it executable.
  79. !
  80. !
  81. ! 4.
  82. ! mkfifo /usr/local/usb_fix.log
  83. !
  84. !
  85. ! 5.
  86. ! Create a script (e.g. named ~/bin/usb_fix_client)
  87. !
  88. ! #!/bin/sh
  89. ! yes 'cat /usr/local/usb_fix.log | sh' | sh
  90. !
  91. ! and put this in your .xinitrc.
  92.  
  93.  
  94. ! Part 3 (since about 2018)
  95. !
  96. ! Every now and then, apt-get can overwrite the xorg-xkb-rules?
  97. ! solution for now is turn off automatic updates.
  98.  
  99. shift Shift_L (0x32), Shift_R (0x3e)
  100. lock Caps_Lock (0x42)
  101. control Control_L (0x25), Control_R (0x69)
  102. mod1 Meta_L (0x85), Meta_R (0x86)
  103. mod2 Num_Lock (0x4d)
  104. mod3 Alt_L (0x40), Alt_R (0x6c)
  105. mod4
  106. mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement