| 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 |
|
| 15 |
|
| 16 |
// Legacy <KPDL> #1 |
| 17 |
// This assumes KP_Decimal will be translated in a dot |
| 18 |
partial keypad_keys |
| 19 |
xkb_symbols "dot" { |
| 20 |
|
| 21 |
key.type[Group1]="KEYPAD" ; |
| 22 |
|
| 23 |
key <KPDL> { [ KP_Delete, KP_Decimal ] }; // <delete> <separator> |
| 24 |
}; |
| 25 |
|
| 26 |
|
| 27 |
// Legacy <KPDL> #2 |
| 28 |
// This assumes KP_Separator will be translated in a comma |
| 29 |
partial keypad_keys |
| 30 |
xkb_symbols "comma" { |
| 31 |
|
| 32 |
key.type[Group1]="KEYPAD" ; |
| 33 |
|
| 34 |
key <KPDL> { [ KP_Delete, KP_Separator ] }; // <delete> <separator> |
| 35 |
}; |
| 36 |
|
| 37 |
|
| 38 |
// Period <KPDL>, usual keyboard serigraphy in most countries |
| 39 |
partial keypad_keys |
| 40 |
xkb_symbols "dotoss" { |
| 41 |
|
| 42 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 43 |
|
| 44 |
key <KPDL> { [ KP_Delete, period, comma, 0x100202F ] }; // <delete> . , ⍽ (narrow no-break space) |
| 45 |
}; |
| 46 |
|
| 47 |
|
| 48 |
// Period <KPDL>, usual keyboard serigraphy in most countries, latin-9 restriction |
| 49 |
partial keypad_keys |
| 50 |
xkb_symbols "dotoss_latin9" { |
| 51 |
|
| 52 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 53 |
|
| 54 |
key <KPDL> { [ KP_Delete, period, comma, nobreakspace ] }; // <delete> . , ⍽ (no-break space) |
| 55 |
}; |
| 56 |
|
| 57 |
|
| 58 |
// Comma <KPDL>, what most non anglo-saxon people consider the real separator |
| 59 |
partial keypad_keys |
| 60 |
xkb_symbols "commaoss" { |
| 61 |
|
| 62 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 63 |
|
| 64 |
key <KPDL> { [ KP_Delete, comma, period, 0x100202F ] }; // <delete> , . ⍽ (narrow no-break space) |
| 65 |
}; |
| 66 |
|
| 67 |
|
| 68 |
// Momayyez <KPDL>: Bahrain, Iran, Iraq, Kuwait, Oman, Qatar, Saudi Arabia, Syria, UAE |
| 69 |
partial keypad_keys |
| 70 |
xkb_symbols "momayyezoss" { |
| 71 |
|
| 72 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 73 |
|
| 74 |
key <KPDL> { [ KP_Delete, 0x100066B, comma, 0x100202F ] }; // <delete> ? , ⍽ (narrow no-break space) |
| 75 |
}; |
| 76 |
|
| 77 |
|
| 78 |
// Abstracted <KPDL>, pray everything will work out (it usually does not) |
| 79 |
partial keypad_keys |
| 80 |
xkb_symbols "kposs" { |
| 81 |
|
| 82 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 83 |
|
| 84 |
key <KPDL> { [ KP_Delete, KP_Decimal, KP_Separator, 0x100202F ] }; // <delete> ? ? ⍽ (narrow no-break space) |
| 85 |
}; |
| 86 |
|
| 87 |
// Spreadsheets may be configured to use the dot as decimal |
| 88 |
// punctuation, comma as a thousands separator and then semi-colon as |
| 89 |
// the list separator. Of these, dot and semi-colon is most important |
| 90 |
// when entering data by the keyboard; the comma can then be inferred |
| 91 |
// and added to the presentation afterwards. Using semi-colon as a |
| 92 |
// general separator may in fact be preferred to avoid ambiguities |
| 93 |
// in data files. Most times a decimal separator is hard-coded, it |
| 94 |
// seems to be period, probably since this is the syntax used in |
| 95 |
// (most) programming languages. |
| 96 |
partial keypad_keys |
| 97 |
xkb_symbols "semi" { |
| 98 |
|
| 99 |
key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; |
| 100 |
|
| 101 |
key <KPDL> { [ NoSymbol, NoSymbol, semicolon ] }; |
| 102 |
}; |