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

numpad (1933B)


  1. default partial xkb_types "pc" {
  2. type "KEYPAD" {
  3. modifiers = Shift+NumLock;
  4. map[None] = Level1;
  5. map[NumLock] = Level2;
  6. map[Shift+NumLock] = Level1;
  7. level_name[Level1] = "Base";
  8. level_name[Level2] = "Number";
  9. };
  10. include "extra(keypad)"
  11. };
  12. // On Mac keypads, level 1 and 2 are swapped.
  13. partial xkb_types "mac" {
  14. type "KEYPAD" {
  15. modifiers = None;
  16. map[None] = Level2;
  17. level_name[Level2] = "Number";
  18. };
  19. include "extra(keypad)"
  20. };
  21. partial xkb_types "microsoft" {
  22. type "KEYPAD" {
  23. modifiers = Shift+NumLock;
  24. map[None] = Level1;
  25. preserve[Shift] = Shift;
  26. map[NumLock] = Level2;
  27. level_name[Level1] = "Base";
  28. level_name[Level2] = "Number";
  29. };
  30. include "extra(keypad)"
  31. };
  32. // Swiss-German style numeric keypad: Shift and NumLock operate as
  33. // two independent modifiers; however, since we want shift state for
  34. // the cursor keys, only three levels are used from the key mappings.
  35. // Closest type is actually FOUR_LEVEL_X, but most numpad layouts use
  36. // FOUR_LEVEL_MIXED_KEYPAD, so that's the one we are going to override.
  37. partial xkb_types "shift3" {
  38. type "FOUR_LEVEL_MIXED_KEYPAD" {
  39. modifiers = Shift+NumLock+Control+Alt;
  40. // NumLock Off => navigate using cursor keys
  41. map[None] = Level1;
  42. // NumLock Off + Shift pressed => select using cursor keys
  43. preserve[Shift] = Shift;
  44. // NumLock On => decimal digits
  45. map[NumLock] = Level2;
  46. // NumLock On + Shift pressed => auxiliary symbols,
  47. // e.g. hexadecimal digits
  48. map[Shift+NumLock] = Level3;
  49. // Ctrl + Alt, regardless of NumLock and Shift => command keys
  50. map[Control+Alt] = Level4;
  51. // reverse map from levels to modifiers
  52. level_name[Level1] = "Base";
  53. level_name[Level2] = "NumLock";
  54. level_name[Level3] = "Shift+NumLock";
  55. level_name[Level4] = "Ctrl+Alt";
  56. };
  57. };