logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

apple (5105B)


  1. //
  2. // Keyboard modification for Apple keyboards
  3. //
  4. default partial modifier_keys
  5. xkb_symbols "extended" {
  6. key <KPEQ> { [ KP_Equal ] };
  7. // The key in the PC's Insert position is sometimes engraved Help (at least
  8. // in Switzerland and Great Britain), with Insert sometimes above. But in the
  9. // US and Canada, it remains Insert. So this should probably be an XkbOption,
  10. // but I have to do more research.
  11. // Perhaps Help should be the primary symbol with Insert in the 1st shift-level
  12. // key <INS> { [ Help, Insert ] };
  13. // The keys next to F12, labeled F13, F14, & F15 generate codes that XFree86
  14. // claims not to generate. I think they should be equivalent to the PC keys
  15. // Print Screen / SysRq, Scroll Lock, and Pause. Linux kernel bug?
  16. // key <PRSC> { [ F13 ] }; // should be keycode 93 or
  17. // key <FK13> { [ F13 ] }; // should be keycode 118
  18. // key <SCLK> { [ F14 ] }; // should be keycode 123 or
  19. // key <FK14> { [ F14 ] }; // should be keycode 119
  20. // key <PAUS> { [ F15 ] }; // should be keycode 127 or
  21. // key <FK15> { [ F15 ] }; // should be keycode 120
  22. };
  23. partial modifier_keys
  24. xkb_symbols "laptop" {
  25. include "macintosh_vndr/apple(extended)"
  26. // The real numlock key on the iBook (shared with F5) works internally to
  27. // the keyboard. It illuminates the Num_Lock led and locks the fn-key to
  28. // type only the keypad keys on the letter keys (U=4, I=5, O=6, P=*, etc.).
  29. // The key in the Num_lock position is engraved with Clear.
  30. override key <NMLK> { [ Clear ] };
  31. // The key engraved Delete sends BKSP. To get Delete, use Shift-Delete
  32. override key <BKSP> { [ BackSpace, Delete ] };
  33. // These keyboards only generate a <RALT> when pressing fn+Alt. This makes
  34. // it impossible to get to the third shift level on keys that are on
  35. // the fn-keypad, so use the Enter key (right of <SPC>) for Mode_switch,
  36. // and use fn+Enter (Apple's code for Menu) for KP_Enter.
  37. replace key <KPEN> { [ ISO_Level3_Shift ] };
  38. modifier_map Mod5 { ISO_Level3_Shift };
  39. // Linux kernel bug with Menu on macs means this does not work yet
  40. // replace key <MENU> { [ KP_Enter ] }; // should be keycode 117
  41. };
  42. partial modifier_keys
  43. xkb_symbols "laptop_bad_switch" {
  44. // Kept for backward compatibility
  45. include "macintosh_vndr/apple(laptop)"
  46. };
  47. // Long Aluminium Keyboards
  48. partial function_keys
  49. xkb_symbols "alukbd" {
  50. // The base is a inet PC keyboard
  51. include "pc"
  52. // Additional Fxx keys
  53. key <FK13> { [ F13 ] };
  54. key <FK14> { [ F14 ] };
  55. key <FK15> { [ F15 ] };
  56. key <FK16> { [ F16 ] };
  57. key <FK17> { [ F17 ] };
  58. key <FK18> { [ F18 ] };
  59. key <FK19> { [ F19 ] };
  60. // On aluminium keyboards, Num_Lock is replace by Clear
  61. replace key <NMLK> { [ Clear ] };
  62. // CAPS key is always Caps_Lock, even for JIS keyboards
  63. replace key <CAPS> { [ Caps_Lock ] };
  64. // F1..F12 are multimedia keys when used with the 'Fn' key
  65. // Make those multimedia actions available via ISO_Level3_Shift too,
  66. // it is useful when the Fn key is remapped to something else (e.g. Insert)
  67. key <FK01> {
  68. type= "FOUR_LEVEL_X",
  69. symbols[Group1]= [ NoSymbol, XF86KbdBrightnessDown, NoSymbol, XF86_Switch_VT_1 ]
  70. };
  71. key <FK02> {
  72. type= "FOUR_LEVEL_X",
  73. symbols[Group1]= [ NoSymbol, XF86KbdBrightnessUp, NoSymbol, XF86_Switch_VT_2 ]
  74. };
  75. key <FK03> {
  76. type= "FOUR_LEVEL_X",
  77. symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_3 ]
  78. };
  79. key <FK04> {
  80. type= "FOUR_LEVEL_X",
  81. symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_4 ]
  82. };
  83. key <FK05> {
  84. type= "FOUR_LEVEL_X",
  85. symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_5 ]
  86. };
  87. key <FK06> {
  88. type= "FOUR_LEVEL_X",
  89. symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_6 ]
  90. };
  91. key <FK07> {
  92. type= "FOUR_LEVEL_X",
  93. symbols[Group1]= [ NoSymbol, XF86AudioPrev, NoSymbol, XF86_Switch_VT_7 ]
  94. };
  95. key <FK08> {
  96. type= "FOUR_LEVEL_X",
  97. symbols[Group1]= [ NoSymbol, XF86AudioPlay, NoSymbol, XF86_Switch_VT_8 ]
  98. };
  99. key <FK09> {
  100. type= "FOUR_LEVEL_X",
  101. symbols[Group1]= [ NoSymbol, XF86AudioNext, NoSymbol, XF86_Switch_VT_9 ]
  102. };
  103. key <FK10> {
  104. type= "FOUR_LEVEL_X",
  105. symbols[Group1]= [ NoSymbol, XF86AudioMute, NoSymbol, XF86_Switch_VT_10 ]
  106. };
  107. key <FK11> {
  108. type= "FOUR_LEVEL_X",
  109. symbols[Group1]= [ NoSymbol, XF86AudioLowerVolume, NoSymbol, XF86_Switch_VT_11 ]
  110. };
  111. key <FK12> {
  112. type= "FOUR_LEVEL_X",
  113. symbols[Group1]= [ NoSymbol, XF86AudioRaiseVolume, NoSymbol, XF86_Switch_VT_12 ]
  114. };
  115. };
  116. // Aluminium Keyboard: make F13, F14, F15 PC-ish (Print, Scroll_Lock, Pause)
  117. partial function_keys keypad_keys
  118. xkb_symbols "alupckeys" {
  119. key <FK13> {
  120. type= "PC_ALT_LEVEL2",
  121. symbols[Group1]= [ Print, Sys_Req ]
  122. };
  123. key <FK14> { [ Scroll_Lock ] };
  124. key <FK15> {
  125. type= "PC_CONTROL_LEVEL2",
  126. symbols[Group1]= [ Pause, Break ]
  127. };
  128. override key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
  129. };