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

kpdl (3398B)


  1. // The <KPDL> key is a mess.
  2. // It was probably originally meant to be a decimal separator.
  3. // Except since it was declared by USA people it didn't use the original
  4. // SI separator "," but a "." (since then the USA managed to f-up the SI
  5. // by making "." an accepted alternative, but standards still use "," as
  6. // default)
  7. // As a result users of SI-abiding countries expect either a "." or a ","
  8. // or a "decimal_separator" which may or may not be translated in one of the
  9. // above depending on applications.
  10. // It's not possible to define a default per-country since user expectations
  11. // depend on the conflicting choices of their most-used applications,
  12. // operating system, etc. Therefore it needs to be a configuration setting
  13. // Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
  14. // Legacy <KPDL> #1
  15. // This assumes KP_Decimal will be translated in a dot
  16. partial keypad_keys
  17. xkb_symbols "dot" {
  18. key.type[Group1]="KEYPAD" ;
  19. key <KPDL> { [ KP_Delete, KP_Decimal ] }; // <delete> <separator>
  20. };
  21. // Legacy <KPDL> #2
  22. // This assumes KP_Separator will be translated in a comma
  23. partial keypad_keys
  24. xkb_symbols "comma" {
  25. key.type[Group1]="KEYPAD" ;
  26. key <KPDL> { [ KP_Delete, KP_Separator ] }; // <delete> <separator>
  27. };
  28. // Period <KPDL>, usual keyboard serigraphy in most countries
  29. partial keypad_keys
  30. xkb_symbols "dotoss" {
  31. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  32. key <KPDL> { [ KP_Delete, period, comma, 0x100202F ] }; // <delete> . , ⍽ (narrow no-break space)
  33. };
  34. // Period <KPDL>, usual keyboard serigraphy in most countries, latin-9 restriction
  35. partial keypad_keys
  36. xkb_symbols "dotoss_latin9" {
  37. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  38. key <KPDL> { [ KP_Delete, period, comma, nobreakspace ] }; // <delete> . , ⍽ (no-break space)
  39. };
  40. // Comma <KPDL>, what most non anglo-saxon people consider the real separator
  41. partial keypad_keys
  42. xkb_symbols "commaoss" {
  43. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  44. key <KPDL> { [ KP_Delete, comma, period, 0x100202F ] }; // <delete> , . ⍽ (narrow no-break space)
  45. };
  46. // Momayyez <KPDL>: Bahrain, Iran, Iraq, Kuwait, Oman, Qatar, Saudi Arabia, Syria, UAE
  47. partial keypad_keys
  48. xkb_symbols "momayyezoss" {
  49. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  50. key <KPDL> { [ KP_Delete, 0x100066B, comma, 0x100202F ] }; // <delete> ? , ⍽ (narrow no-break space)
  51. };
  52. // Abstracted <KPDL>, pray everything will work out (it usually does not)
  53. partial keypad_keys
  54. xkb_symbols "kposs" {
  55. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  56. key <KPDL> { [ KP_Delete, KP_Decimal, KP_Separator, 0x100202F ] }; // <delete> ? ? ⍽ (narrow no-break space)
  57. };
  58. // Spreadsheets may be configured to use the dot as decimal
  59. // punctuation, comma as a thousands separator and then semi-colon as
  60. // the list separator. Of these, dot and semi-colon is most important
  61. // when entering data by the keyboard; the comma can then be inferred
  62. // and added to the presentation afterwards. Using semi-colon as a
  63. // general separator may in fact be preferred to avoid ambiguities
  64. // in data files. Most times a decimal separator is hard-coded, it
  65. // seems to be period, probably since this is the syntax used in
  66. // (most) programming languages.
  67. partial keypad_keys
  68. xkb_symbols "semi" {
  69. key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
  70. key <KPDL> { [ NoSymbol, NoSymbol, semicolon ] };
  71. };