1default hidden partial keypad_keys 2xkb_symbols "x11" { 3 4 include "keypad(operators)" 5 6 key <KP7> { [ KP_Home, KP_7 ] }; 7 key <KP8> { [ KP_Up, KP_8 ] }; 8 key <KP9> { [ KP_Prior, KP_9 ] }; 9 10 key <KP4> { [ KP_Left, KP_4 ] }; 11 key <KP5> { [ KP_Begin, KP_5 ] }; 12 key <KP6> { [ KP_Right, KP_6 ] }; 13 14 key <KP1> { [ KP_End, KP_1 ] }; 15 key <KP2> { [ KP_Down, KP_2 ] }; 16 key <KP3> { [ KP_Next, KP_3 ] }; 17 key <KPEN> { [ KP_Enter ] }; 18 key <KPEQ> { [ KP_Equal ] }; 19 20 key <KP0> { [ KP_Insert, KP_0 ] }; 21 key <KPDL> { [ KP_Delete, KP_Decimal ] }; 22 key <KPPT> { [ KP_Decimal, KP_Decimal ] }; 23}; 24 25hidden partial keypad_keys 26xkb_symbols "overlay" { 27 include "keypad(overlay1)" 28}; 29 30hidden partial keypad_keys 31xkb_symbols "overlay1" { 32 33 key <KP7> { [ KP_Home ], overlay1=<KO7> }; 34 key <KP8> { [ KP_Up ], overlay1=<KO8> }; 35 key <KP9> { [ KP_Prior ], overlay1=<KO9> }; 36 37 key <KP4> { [ KP_Left ], overlay1=<KO4> }; 38 key <KP5> { [ KP_Begin ], overlay1=<KO5> }; 39 key <KP6> { [ KP_Right ], overlay1=<KO6> }; 40 41 key <KP1> { [ KP_End ], overlay1=<KO1> }; 42 key <KP2> { [ KP_Down ], overlay1=<KO2> }; 43 key <KP3> { [ KP_Next ], overlay1=<KO3> }; 44 45 key <KP0> { [ KP_Insert ], overlay1=<KO0> }; 46 key <KPDL> { [ KP_Delete ], overlay1=<KODL> }; 47 48 key <KO7> { [ KP_7 ] }; 49 key <KO8> { [ KP_8 ] }; 50 key <KO9> { [ KP_9 ] }; 51 52 key <KO4> { [ KP_4 ] }; 53 key <KO5> { [ KP_5 ] }; 54 key <KO6> { [ KP_6 ] }; 55 56 key <KO1> { [ KP_1 ] }; 57 key <KO2> { [ KP_2 ] }; 58 key <KO3> { [ KP_3 ] }; 59 60 key <KO0> { [ KP_0 ] }; 61 key <KODL> { [ KP_Decimal ] }; 62}; 63 64hidden partial keypad_keys 65xkb_symbols "overlay2" { 66 67 key <KP7> { [ KP_Home ], overlay2=<KO7> }; 68 key <KP8> { [ KP_Up ], overlay2=<KO8> }; 69 key <KP9> { [ KP_Prior ], overlay2=<KO9> }; 70 71 key <KP4> { [ KP_Left ], overlay2=<KO4> }; 72 key <KP5> { [ KP_Begin ], overlay2=<KO5> }; 73 key <KP6> { [ KP_Right ], overlay2=<KO6> }; 74 75 key <KP1> { [ KP_End ], overlay2=<KO1> }; 76 key <KP2> { [ KP_Down ], overlay2=<KO2> }; 77 key <KP3> { [ KP_Next ], overlay2=<KO3> }; 78 79 key <KP0> { [ KP_Insert ], overlay2=<KO0> }; 80 key <KPDL> { [ KP_Delete ], overlay2=<KODL> }; 81 82 key <KO7> { [ KP_7 ] }; 83 key <KO8> { [ KP_8 ] }; 84 key <KO9> { [ KP_9 ] }; 85 86 key <KO4> { [ KP_4 ] }; 87 key <KO5> { [ KP_5 ] }; 88 key <KO6> { [ KP_6 ] }; 89 90 key <KO1> { [ KP_1 ] }; 91 key <KO2> { [ KP_2 ] }; 92 key <KO3> { [ KP_3 ] }; 93 94 key <KO0> { [ KP_0 ] }; 95 key <KODL> { [ KP_Decimal ] }; 96}; 97 98hidden partial keypad_keys 99xkb_symbols "operators" { 100 // Puts some commands to control the X server on 101 // the fifth level of the keypad's operator keys. 102 key <KPDV> { 103 type="CTRL+ALT", // Ungrab cancels server/keyboard/pointer grabs 104 symbols[Group1]= [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86_Ungrab ] 105 }; 106 key <KPMU> { 107 type="CTRL+ALT", // ClsGrb kills whichever client has a grab in effect 108 symbols[Group1]= [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86_ClearGrab ] 109 }; 110 key <KPSU> { 111 type="CTRL+ALT", // -VMode switches to the previous video mode 112 symbols[Group1]= [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86_Prev_VMode ] 113 }; 114 key <KPAD> { 115 type="CTRL+ALT", // +VMode switches to the next video mode 116 symbols[Group1]= [ KP_Add, KP_Add, KP_Add, KP_Add, XF86_Next_VMode ] 117 }; 118}; 119 120// Legacy PC keypad definition 121// Copyright © 2006-2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 122keypad_keys 123xkb_symbols "legacy" { 124 125 include "keypad(core)" 126 include "keypad(legacymath)" 127 include "keypad(legacynumber)" 128 include "kpdl(dot)" 129}; 130 131 132// Legacy Wang 725-3771-ae and 725-3771-uk keypad definition 133// Copyright © 2006-2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 134keypad_keys 135xkb_symbols "legacy_wang" { 136 137 include "keypad(core)" 138 include "keypad(legacymath)" 139 include "keypad(legacynumber_wang)" 140 include "kpdl(dot)" 141}; 142 143 144// Complete new keypad definition 145// Copyright © 2006-2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 146keypad_keys 147xkb_symbols "oss" { 148 149 include "keypad(core)" 150 include "keypad(ossmath)" 151 include "keypad(ossnumber)" 152 include "kpdl(dotoss)" 153}; 154 155 156// Latin9 restriction of new keypad definition 157// Copyright © 2006-2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 158keypad_keys 159xkb_symbols "oss_latin9" { 160 161 include "keypad(core)" 162 include "keypad(ossmath_latin9)" 163 include "keypad(legacynumber)" 164 include "kpdl(dotoss_latin9)" 165}; 166 167 168// Wang 725-3771-ae and 725-3771-uk keypad variant of oss keypad 169// Copyright © 2006-2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 170keypad_keys 171xkb_symbols "oss_wang" { 172 173 include "keypad(core)" 174 include "keypad(ossmath)" 175 include "keypad(ossnumber_wang)" 176 include "kpdl(dotoss)" 177}; 178 179 180// Forward-looking keypad definition 181// Won't work with applications that make ASCII assumptions 182// Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 183keypad_keys 184xkb_symbols "future" { 185 186 include "keypad(core)" 187 include "keypad(futuremath)" 188 include "keypad(ossnumber)" 189 include "kpdl(commaoss)" 190}; 191 192 193// Forward-looking keypad definition 194// Won't work with applications that make ASCII assumptions 195// Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 196keypad_keys 197xkb_symbols "future_wang" { 198 199 include "keypad(core)" 200 include "keypad(futuremath)" 201 include "keypad(ossnumber_wang)" 202 include "kpdl(commaoss)" 203}; 204 205 206// Keypad keys nobody changes 207// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 208partial keypad_keys 209xkb_symbols "core" { 210 211 modifier_map Mod2 { Num_Lock }; 212 213 key <NMLK> { [ Num_Lock ] }; 214 key <KPEN> { [ KP_Enter ] }; 215 key <KPEQ> { [ KP_Equal ] }; 216}; 217 218 219// Legacy keypad math area 220// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 221// 222// ┏━━━━━┱─────┬─────┬─────┐ 223// ┃Num ┃ ₁ │ ₂ │ ₃ │ ₁ <XF86_Ungrab> 224// ┃Lock⇭┃ / │ * │ - │ ₂ <XF86_ClearGrab> 225// ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode> 226// │ ₄ │ ₄ <XF86_Next_VMode> 227// │ │ 228// ┤ │ 1 None 229// │ │ 2 Ctrl+Alt 230// │ + │ 231// ╆━━━━━┪ 232partial keypad_keys 233xkb_symbols "legacymath" { 234 235 key.type[Group1]="CTRL+ALT" ; 236 237 key <KPDV> { [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86_Ungrab ] }; // / <XF86_Ungrab> 238 key <KPMU> { [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86_ClearGrab ] }; // * <XF86_ClearGrab> 239 key <KPSU> { [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86_Prev_VMode ] }; // - <XF86_Prev_VMode> 240 241 key <KPAD> { [ KP_Add, KP_Add, KP_Add, KP_Add, XF86_Next_VMode ] }; // + <XF86_Next_VMode> 242}; 243 244 245// Keypad math area with non-CS operators 246// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 247// 248// ┏━━━━━┱─────┬─────┬─────┐ 249// ┃Num ┃ ∕ ₁ │ . ₂ │ − ₃ │ ₁ <XF86_Ungrab> 250// ┃Lock⇭┃ / ÷ │ * × │ - − │ ₂ <XF86_ClearGrab> 251// ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode> 252// │ + ₄ │ ₄ <XF86_Next_VMode> 253// │ │ 254// ┤ │ 1 None 255// │ │ 2 Level3 ⇮ 256// │ + + │ 3 Shift+Level3 ⇧⇮ 257// ╆━━━━━┪ 4 Ctrl+Alt 258partial keypad_keys 259xkb_symbols "ossmath" { 260 261 key.type[Group1]="CTRL+ALT" ; 262 263 key <KPDV> { [ KP_Divide, 0x1002215, 0x10000F7, VoidSymbol, XF86_Ungrab ] }; // / ∕ ÷ <XF86_Ungrab> 264 key <KPMU> { [ KP_Multiply, 0x10022C5, 0x10000D7, VoidSymbol, XF86_ClearGrab ] }; // * ⋅ × <XF86_ClearGrab> 265 key <KPSU> { [ KP_Subtract, 0x1002212, 0x1002212, VoidSymbol, XF86_Prev_VMode ] }; // - − − <XF86_Prev_VMode> 266 267 key <KPAD> { [ KP_Add, 0x100002B, 0x100002B, VoidSymbol, XF86_Next_VMode ] }; // + + + <XF86_Next_VMode> 268}; 269 270 271// Keypad math area with non-CS operators in first levels 272// As demanded by users not interested in legacy pre-unicode junk 273// Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 274// 275// ┏━━━━━┱─────┬─────┬─────┐ 276// ┃Num ┃ / ₁ │ * ₂ │ - ₃ │ ₁ <XF86_Ungrab> 277// ┃Lock⇭┃ ∕ ÷ │ . × │ − − │ ₂ <XF86_ClearGrab> 278// ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode> 279// │ + ₄ │ ₄ <XF86_Next_VMode> 280// │ │ 281// ┤ │ 1 None 282// │ │ 2 Level3 ⇮ 283// │ + + │ 3 Shift+Level3 ⇧⇮ 284// ╆━━━━━┪ 4 Ctrl+Alt 285partial keypad_keys 286xkb_symbols "futuremath" { 287 288 key.type[Group1]="FOUR_LEVEL_X" ; 289 290 key <KPDV> { [ 0x1002215, KP_Divide, 0x10000F7, XF86_Ungrab ] }; // ∕ / ÷ <XF86_Ungrab> 291 key <KPMU> { [ 0x10022C5, KP_Multiply, 0x10000D7, XF86_ClearGrab ] }; // ⋅ * × <XF86_ClearGrab> 292 key <KPSU> { [ 0x1002212, KP_Subtract, 0x1002212, XF86_Prev_VMode ] }; // − - − <XF86_Prev_VMode> 293 294 key <KPAD> { [ 0x100002B, KP_Add, 0x100002B, XF86_Next_VMode ] }; // + + + <XF86_Next_VMode> 295}; 296 297 298// Keypad math area with non-CS operators, restricted to latin9 299// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 300// 301// ┏━━━━━┱─────┬─────┬─────┐ 302// ┃Num ┃ / ₁ │ · ₂ │ - ₃ │ ₁ <XF86_Ungrab> 303// ┃Lock⇭┃ / ÷ │ * × │ - - │ ₂ <XF86_ClearGrab> 304// ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode> 305// │ + ₄ │ ₄ <XF86_Next_VMode> 306// │ │ 307// ┤ │ 1 None 308// │ │ 2 Level3 ⇮ 309// │ + + │ 3 Shift+Level3 ⇧⇮ 310// ╆━━━━━┪ 4 Ctrl+Alt 311partial keypad_keys 312xkb_symbols "ossmath_latin9" { 313 314 key.type[Group1]="FOUR_LEVEL_X"; 315 316 key <KPDV> { [ KP_Divide, slash, division, XF86_Ungrab ] }; // / / ÷ <XF86_Ungrab> 317 key <KPMU> { [ KP_Multiply, periodcentered, multiply, XF86_ClearGrab ] }; // * · × <XF86_ClearGrab> 318 key <KPSU> { [ KP_Subtract, minus, minus, XF86_Prev_VMode ] }; // - - - <XF86_Prev_VMode> 319 320 key <KPAD> { [ KP_Add, plus, plus, XF86_Next_VMode ] }; // + + + <XF86_Next_VMode> 321}; 322 323 324// Legacy keypad number area 325// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 326// 327// ┏━━━━━┱ 328// ┃Num ┃ ⇱ Home 329// ┃Lock⇭┃ ⇲ End 330// ┡━━━━━╃─────┼─────┼ ⇞ Page up 331// │ 7 │ 8 │ 9 │ ⇟ Page down 332// │ ⇱ │ ⇧ │ ⇞ │ ⎀ Insert 333// ├─────┼─────┼─────┤ ␥ Delete 334// │ 4 │ 5 │ 6 │ ⇦⇧⇨⇩ Directions 335// │ ⇦ │ │ ⇨ │ 336// ├─────┼─────┼─────╆ 337// │ 1 │ 2 │ 3 ┃ 338// │ ⇲ │ ⇩ │ ⇟ ┃ 1 None 339// ├─────┴─────┼─────┨ 2 Num Lock ⇭ 340// │ 0 │ 341// │ ⎀ │ 342// └───────────┴ 343partial keypad_keys 344xkb_symbols "legacynumber" { 345 346 key.type[Group1]="KEYPAD" ; 347 348 key <KP7> { [ KP_Home, KP_7 ] }; // <home> 7 349 key <KP8> { [ KP_Up, KP_8 ] }; // <up> 8 350 key <KP9> { [ KP_Prior, KP_9 ] }; // <prior> 9 351 352 key <KP4> { [ KP_Left, KP_4 ] }; // <left> 4 353 key <KP5> { [ KP_Begin, KP_5 ] }; // <begin> 5 354 key <KP6> { [ KP_Right, KP_6 ] }; // <right> 6 355 356 key <KP1> { [ KP_End, KP_1 ] }; // <end> 1 357 key <KP2> { [ KP_Down, KP_2 ] }; // <down> 2 358 key <KP3> { [ KP_Next, KP_3 ] }; // <next> 3 359 360 key <KP0> { [ KP_Insert, KP_0 ] }; // <insert> 0 361}; 362 363 364// Legacy Wang 725-3771-ae and 725-3771-uk keypad number area 365// Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 366// This is actually a three-level keypad, declared as four-level 367// to avoid defining a new type 368// 369// ┏━━━━━┱ 370// ┃Num ┃ ⇱ Home 371// ┃Lock⇭┃ ⇲ End 372// ┡━━━━━╃─────┼─────┼ ⇞ Page up 373// │ 7 │ 8 │ 9 │ ⇟ Page down 374// │ ⇱ < │ ⇧ > │ ⇞ ^ │ ⎀ Insert 375// ├─────┼─────┼─────┤ ␥ Delete 376// │ 4 │ 5 │ 6 │ ⇦⇧⇨⇩ Directions 377// │ ⇦ [ │ ] │ ⇨ $ │ 378// ├─────┼─────┼─────╆ 379// │ 1 │ 2 │ 3 ┃ 380// │ ⇲ & │ ⇩ @ │ ⇟ # ┃ 1 None 381// ├─────┴─────┼─────┨ 2 Num Lock ⇭ 382// │ 0 │ 3 Level3 ⇮ 383// │ ⎀ │ 384// └───────────┴ 385partial keypad_keys 386xkb_symbols "legacynumber_wang" { 387 388 key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; 389 390 key <KP7> { [ KP_Home, KP_7, less ] }; // <home> 7 < 391 key <KP8> { [ KP_Up, KP_8, greater ] }; // <up> 8 > 392 key <KP9> { [ KP_Prior, KP_9, asciicircum ] }; // <prior> 9 ^ 393 394 key <KP4> { [ KP_Left, KP_4, bracketleft ] }; // <left> 4 [ 395 key <KP5> { [ KP_Begin, KP_5, bracketright ] }; // <begin> 5 ] 396 key <KP6> { [ KP_Right, KP_6, dollar ] }; // <right> 6 $ 397 398 key <KP1> { [ KP_End, KP_1, ampersand ] }; // <end> 1 & 399 key <KP2> { [ KP_Down, KP_2, at ] }; // <down> 2 @ 400 key <KP3> { [ KP_Next, KP_3, numbersign ] }; // <next> 3 # 401 402 key <KP0> { [ KP_Insert, KP_0, apostrophe ] }; // <insert> 0 ' 403}; 404 405 406// Keypad number area with arrow symbols 407// Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 408// 409// ┏━━━━━┱ 410// ┃Num ┃ ⇱ Home 411// ┃Lock⇭┃ ⇲ End 412// ┡━━━━━╃─────┼─────┼ ⇞ Page up 413// │ 7 ⇖ │ 8 ⇑ │ 9 ⇗ │ ⇟ Page down 414// │ ⇱ ↖ │ ⇧ ↑ │ ⇞ ↗ │ ⎀ Insert 415// ├─────┼─────┼─────┤ ␥ Delete 416// │ 4 ⇐ │ 5 ⇔ │ 6 ⇒ │ ⇦⇧⇨⇩ Directions 417// │ ⇦ ← │ ↔ │ ⇨ → │ ⍽ narrow no-break space 418// ├─────┼─────┼─────╆ 419// │ 1 ⇙ │ 2 ⇓ │ 3 ⇘ ┃ 420// │ ⇲ ↙ │ ⇩ ↓ │ ⇟ ↘ ┃ 1 None 421// ├─────┴─────┼─────┨ 2 Num Lock ⇭ 422// │ 0 ⇕ │ 3 Level3 ⇮ 423// │ ⎀ ↕ │ 4 Shift+Level3 ⇧⇮ 424// └───────────┴ 425partial keypad_keys 426xkb_symbols "ossnumber" { 427 428 key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; 429 430 key <KP7> { [ KP_Home, KP_7, 0x1002196, 0x10021D6 ] }; // <home> 7 ↖ ⇖ 431 key <KP8> { [ KP_Up, KP_8, 0x1002191, 0x10021D1 ] }; // <up> 8 ↑ ⇑ 432 key <KP9> { [ KP_Prior, KP_9, 0x1002197, 0x10021D7 ] }; // <prior> 9 ↗ ⇗ 433 434 key <KP4> { [ KP_Left, KP_4, 0x1002190, 0x10021D0 ] }; // <left> 4 ← ⇐ 435 key <KP5> { [ KP_Begin, KP_5, 0x1002194, 0x10021D4 ] }; // <begin> 5 ↔ ⇔ 436 key <KP6> { [ KP_Right, KP_6, 0x1002192, 0x10021D2 ] }; // <right> 6 → ⇒ 437 438 key <KP1> { [ KP_End, KP_1, 0x1002199, 0x10021D9 ] }; // <end> 1 ↙ ⇙ 439 key <KP2> { [ KP_Down, KP_2, 0x1002193, 0x10021D3 ] }; // <down> 2 ↓ ⇓ 440 key <KP3> { [ KP_Next, KP_3, 0x1002198, 0x10021D8 ] }; // <next> 3 ↘ ⇘ 441 442 key <KP0> { [ KP_Insert, KP_0, 0x1002195, 0x10021D5 ] }; // <insert> 0 ↕ ⇕ 443}; 444 445 446// Wang 725-3771-ae and 725-3771-uk keypad number area with additional arrow symbols 447// Copyright © 2007 Nicolas Mailhot <nicolas.mailhot @ laposte.net> 448// 449// ┏━━━━━┱ 450// ┃Num ┃ ⇱ Home 451// ┃Lock⇭┃ ⇲ End 452// ┡━━━━━╃─────┼─────┼ ⇞ Page up 453// │ 7 ↖ │ 8 ↑ │ 9 ↗ │ ⇟ Page down 454// │ ⇱ < │ ⇧ > │ ⇞ ^ │ ⎀ Insert 455// ├─────┼─────┼─────┤ ␥ Delete 456// │ 4 ← │ 5 ↔ │ 6 → │ ⇦⇧⇨⇩ Directions 457// │ ⇦ [ │ ] │ ⇨ $ │ ⍽ narrow no-break space 458// ├─────┼─────┼─────╆ 459// │ 1 ↙ │ 2 ↓ │ 3 ↘ ┃ 460// │ ⇲ & │ ⇩ @ │ ⇟ # ┃ 1 None 461// ├─────┴─────┼─────┨ 2 Num Lock ⇭ 462// │ 0 ↕ │ 3 Level3 ⇮ 463// │ ⎀ ' │ 4 Shift+Level3 ⇧⇮ 464// └───────────┴ 465partial keypad_keys 466xkb_symbols "ossnumber_wang" { 467 468 key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; 469 470 key <KP7> { [ KP_Home, KP_7, less, 0x1002196 ] }; // <home> 7 < ↖ 471 key <KP8> { [ KP_Up, KP_8, greater, 0x1002191 ] }; // <up> 8 > ↑ 472 key <KP9> { [ KP_Prior, KP_9, asciicircum, 0x1002197 ] }; // <prior> 9 ^ ↗ 473 474 key <KP4> { [ KP_Left, KP_4, bracketleft, 0x1002190 ] }; // <left> 4 [ ← 475 key <KP5> { [ KP_Begin, KP_5, bracketright, 0x1002194 ] }; // <begin> 5 ] ↔ 476 key <KP6> { [ KP_Right, KP_6, dollar, 0x1002192 ] }; // <right> 6 $ → 477 478 key <KP1> { [ KP_End, KP_1, ampersand, 0x1002199 ] }; // <end> 1 & ↙ 479 key <KP2> { [ KP_Down, KP_2, at, 0x1002193 ] }; // <down> 2 @ ↓ 480 key <KP3> { [ KP_Next, KP_3, numbersign, 0x1002198 ] }; // <next> 3 # ↘ 481 482 key <KP0> { [ KP_Insert, KP_0, apostrophe, 0x1002195 ] }; // <insert> 0 ' ↕ 483}; 484 485// Standard base "pc" layout only contains cursor keys, and then gets 486// augmented with the digits later. If you define your own layout for 487// the numpad you can inherit the cursors, but you'll have to define 488// the digits yourself. This module can be included in the rules to 489// define math operators; these are the variants used in computer 490// languages that are based on ASCII. NoSymbol does not mean that 491// nothing is bound to the key but that no assignment is done here. 492// srvr_ctrl(stdkeypad) and keypad(x11) declare the operator keys to 493// be of type CTRL+ALT in order to assign server control events to 494// them, but it uses the second level which is overwritten if we have 495// more than one definition (shift state) for the key. Instead, here 496// the commands are put at the 4th lever. 497partial keypad_keys 498xkb_symbols "ops" { 499 key <KPDV> { [ NoSymbol, slash, NoSymbol, XF86_Ungrab ] }; 500 key <KPMU> { [ NoSymbol, asterisk, NoSymbol, XF86_ClearGrab ] }; 501 key <KPSU> { [ NoSymbol, minus, NoSymbol, XF86_Prev_VMode ] }; 502 key <KPAD> { [ NoSymbol, plus, NoSymbol, XF86_Next_VMode ] }; 503 key <KPEQ> { [ NoSymbol, equal ] }; 504}; 505 506// Hexadecimal Numpad, by Roland Kaufmann <rlndkfmn at gmail dot com> 507// License: BSD (also covers variant with ATM digit order) 508// Third-level gives the letters used in hexadecimal numbers, or 509// columns in small spreadsheets. As a bonus, having 'e' available at 510// the center of the keyboard makes it easy to enter floating point 511// numbers in scientific notation. 512// Equal is added to start formulas (most numpads on PCs don't have 513// their own equal key), comma as a list separator (as most 514// programming languages wants period as a decimal separator) and 515// colon to enter times and ranges. Someone also may want to represent 516// multiplication and division in prose using x and colon. 517// Two first levels are specified as NoSymbol to not override any 518// previous specification. Combine this with another keypad specifier, 519// e.g. "legacy". 520partial keypad_keys 521xkb_symbols "hex" { 522 key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; 523 524 // None NumLock AltGr 525 // symbol row 526 key <KPDV> { [ NoSymbol, NoSymbol, parenleft ] }; 527 key <KPMU> { [ NoSymbol, NoSymbol, parenright ] }; 528 key <KPSU> { [ NoSymbol, NoSymbol, dollar ] }; 529 530 // upper row 531 key <KP7> { [ NoSymbol, NoSymbol, a ] }; 532 key <KP8> { [ NoSymbol, NoSymbol, b ] }; 533 key <KP9> { [ NoSymbol, NoSymbol, c ] }; 534 535 // home row 536 key <KP4> { [ NoSymbol, NoSymbol, d ] }; 537 key <KP5> { [ NoSymbol, NoSymbol, e ] }; 538 key <KP6> { [ NoSymbol, NoSymbol, f ] }; 539 key <KPAD> { [ NoSymbol, NoSymbol, comma ] }; 540 541 // lower row 542 key <KP1> { [ NoSymbol, NoSymbol, equal ] }; 543 key <KP2> { [ NoSymbol, NoSymbol, x ] }; 544 key <KP3> { [ NoSymbol, NoSymbol, colon ] }; 545 546 // decimal row 547 key <KP0> { [ NoSymbol, NoSymbol, backslash ] }; 548}; 549 550// Main numbers follows the traditions from ATMs and phones with 551// numbers increasing downwards to the right. (It is easier to 552// change the keyboard layout than to reprogram your local ATM; 553// also cell-phones are becoming more common while calculators are 554// becoming more rare). 555// First level is left unspecified, so it may be combined with another 556// layout, e.g. "legacy". 557partial keypad_keys 558xkb_symbols "atm" { 559 // upper row 560 key <KP7> { [ NoSymbol, KP_1 ] }; 561 key <KP8> { [ NoSymbol, KP_2 ] }; 562 key <KP9> { [ NoSymbol, KP_3 ] }; 563 564 // lower row 565 key <KP1> { [ NoSymbol, KP_7 ] }; 566 key <KP2> { [ NoSymbol, KP_8 ] }; 567 key <KP3> { [ NoSymbol, KP_9 ] }; 568}; 569 570 571partial modifier_keys 572xkb_symbols "pointerkeys" { 573 key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] }; 574}; 575 576 577// Only numbers, operators and decimal separator, 578// as seen on keypad overlay on Japanese keyboard. 579// ┌─┬─┬─┬─┐ 580// │7│8│9│*│ 581// ├─┼─┼─┼─┤ 582// │4│5│6│-│ 583// ├─┼─┼─┼─┤ 584// │1│2│3│+│ 585// ├─┼─┼─┼─┤ 586// │0│ │·│/│ 587// └─┴─┴─┴─┘ 588partial keypad_keys 589xkb_symbols "numoperdecsep" { 590 key <KO7> { [ KP_7 ] }; 591 key <KO8> { [ KP_8 ] }; 592 key <KO9> { [ KP_9 ] }; 593// ClsGrb kills whichever client has a grab in effect 594 key <KOMU> { 595 type="CTRL+ALT", 596 symbols[Group1]= [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86_ClearGrab ] 597 }; 598 599 key <KO4> { [ KP_4 ] }; 600 key <KO5> { [ KP_5 ] }; 601 key <KO6> { [ KP_6 ] }; 602// -VMode switches to the previous video mode 603 key <KOSU> { 604 type="CTRL+ALT", 605 symbols[Group1]= [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86_Prev_VMode ] 606 }; 607 608 key <KO1> { [ KP_1 ] }; 609 key <KO2> { [ KP_2 ] }; 610 key <KO3> { [ KP_3 ] }; 611// +VMode switches to the next video mode 612 key <KOAD> { 613 type="CTRL+ALT", 614 symbols[Group1]= [ KP_Add, KP_Add, KP_Add, KP_Add, XF86_Next_VMode ] 615 }; 616 617 key <KO0> { [ KP_0 ] }; 618 key <KODL> { [ KP_Decimal ] }; 619// Ungrab cancels server/keyboard/pointer grabs 620 key <KODV> { 621 type="CTRL+ALT", 622 symbols[Group1]= [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86_Ungrab ] 623 }; 624}; 625