Advertisement
Guest User

Untitled

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