Skip to content

Instantly share code, notes, and snippets.

@dcunited001
Created December 22, 2015 11:24
Show Gist options
  • Save dcunited001/dd42f81f7a084dedb242 to your computer and use it in GitHub Desktop.
Save dcunited001/dd42f81f7a084dedb242 to your computer and use it in GitHub Desktop.
Xkb digimon layout with unicode & emoji for linux mint
// check out my keyboard dotfiles for info
// - https://github.com/dcunited001/dc.files.kbd/tree/master/xkeyboard
partial alphanumeric_keys
xkb_symbols "basic" {
include "us"
name[Group1]= "Digimon - US";
// shift + space = underscore
key <SPCE> { [ space, underscore, nobreakspace, nobreakspace ] };
// remap symbols to digits
// key <TLDE> { [ grave, asciitilde ] };
key <AE01> { [ exclam, 1 ] };
key <AE02> { [ at, 2 ] };
key <AE03> { [ numbersign, 3 ] };
key <AE04> { [ dollar, 4 ] };
key <AE05> { [ percent, 5 ] };
key <AE06> { [ asciicircum, 6 ] };
key <AE07> { [ ampersand, 7 ] };
key <AE08> { [ asterisk, 8 ] };
key <AE09> { [ parenleft, 9 ] };
key <AE10> { [ parenright, 0 ] };
// key <AE11> { [ minus, underscore ] };
// key <AE12> { [ equal, plus ] };
// remap digits to function keys
// - not working at the moment
key <FK01> { [ 1, F1 ] };
key <FK02> { [ 2, F2 ] };
key <FK03> { [ 3, F3 ] };
key <FK04> { [ 4, F4 ] };
key <FK05> { [ 5, F5 ] };
key <FK06> { [ 6, F6 ] };
key <FK07> { [ 7, F7 ] };
key <FK08> { [ 8, F8 ] };
key <FK09> { [ 9, F9 ] };
key <FK10> { [ 0, F10 ] };
key <FK11> { [ underscore, F11 ] };
key <FK12> { [ plus, F12 ] };
// TODO: remap function key as hyper using virtual modkeys
// TODO: set escape (capslock) to uber key, using virtual modkey
// TODO: map unicode chars to shift+digits & alt+digits
// TODO: simultaneous keypresses?
};
partial alphanumeric_keys
xkb_symbols "emojio" {
//TODO: from int'l and then override the apostrophes
include "io(basic)"
name[Group1]= "Digimon - Emoji";
// remap symbols to digits
// key <TLDE> { [ grave, asciitilde ] };
// - strongly recommend retaining the digits!
// - if for some reason the xkb fn keys fail, u get locked out
key <AE01> { [ exclam, 1, U1F600, U1F4A9 ] }; // ! 1 ๐Ÿ˜€ ๐Ÿ’ฉ
key <AE02> { [ at, 2, U1F601, U1F47B ] }; // @ 2 ๐Ÿ˜ ๐Ÿ‘ป
key <AE03> { [ numbersign, 3, U1F602, U1F64C ] }; // # 3 ๐Ÿ˜‚ ๐Ÿ™Œ
key <AE04> { [ dollar, 4, U1F606, U26A1 ] }; // $ 4 ๐Ÿ˜† โšก๏ธ
key <AE05> { [ percent, 5, U1F605, U1F4AB ] }; // % 5 ๐Ÿ˜… ๐Ÿ’ซ
key <AE06> { [ asciicircum, 6, U1F607, U1F31F ] }; // ^ 6 ๐Ÿ˜‡ ๐ŸŒŸ
key <AE07> { [ ampersand, 7, U1F61D, U1F37B ] }; // & 7 ๐Ÿ˜ ๐Ÿป
key <AE08> { [ asterisk, 8, U1F914, U1F680 ] }; // * 8 ๐Ÿค” ๐Ÿš€
key <AE09> { [ parenleft, 9, U1F62B, U1F3C1 ] }; // ( 9 ๐Ÿ˜ซ ๐Ÿ
key <AE10> { [ parenright, 0, U1F616, U231A ] }; // ) 0 ๐Ÿ˜– โŒš๏ธ
key <AE11> { [ minus, underscore, U1F631, U1F4A1 ] }; // - _ ๐Ÿ˜ฑ ๐Ÿ’ก
key <AE12> { [ equal, plus, U1F62D, U1F48E ] }; // = + ๐Ÿ˜ญ ๐Ÿ’Ž
// remap digits to function keys
// - not working at the moment
key <FK01> { [ 1, F1, U1F52E, U1F513 ] }; // 1 F1 ๐Ÿ”ฎ ๐Ÿ”“
key <FK02> { [ 2, F2, U1F4A3, U1F4AF ] }; // 2 F2 ๐Ÿ’ฃ ๐Ÿ’ฏ
key <FK03> { [ 3, F3, U2696, U269C ] }; // 3 F3 โš– โšœ
key <FK04> { [ 4, F4, U23F3, U267B ] }; // 4 F4 โณ โ™ป๏ธ
key <FK05> { [ 5, F5, U1F511, U2705 ] }; // 5 F5 ๐Ÿ”‘ โœ…
key <FK06> { [ 6, F6, U1F3FA, U1F300 ] }; // 6 F6 ๐Ÿบ ๐ŸŒ€
key <FK07> { [ 7, F7, U1F52D, U1F50A ] }; // 7 F7 ๐Ÿ”ญ ๐Ÿ”Š
key <FK08> { [ 8, F8, U1F52C, U1F507 ] }; // 8 F8 ๐Ÿ”ฌ ๐Ÿ”‡
key <FK09> { [ 9, F9, U1F4EF, U1F0CF ] }; // 9 F9 ๐Ÿ“ฏ ๐Ÿƒ
key <FK10> { [ 0, F10, U1F587, U1F3B6 ] }; // 0 F10 ๐Ÿ–‡ ๐ŸŽถ
key <FK11> { [ underscore, F11, U2702, U3030 ] }; // _ F11 โœ‚๏ธ ใ€ฐ
key <FK12> { [ plus, F12, U1F4D0, U27B0 ] }; // + F12 ๐Ÿ“ โžฐ
// right alt => alt-gr
include "level3(ralt_switch)"
};
// UXXXX + UFE0F => Unicode variation
// - not really sure how to get this to work with XKB. xkbcommon can do this, but not xkb
// - might be able to use the compose functionality in X11 (dead keys?) (multi_key?)
// ๐Ÿ˜€ ๐Ÿ˜ ๐Ÿ˜‚ ๐Ÿ˜† ๐Ÿ˜… ๐Ÿ˜‡ ๐Ÿ˜ ๐Ÿค” ๐Ÿ˜ซ ๐Ÿ˜– ๐Ÿ˜ฑ ๐Ÿ˜ญ
// ๐Ÿ’ฉ ๐Ÿ‘ป ๐Ÿ™Œ โšก ๐Ÿ’ซ ๐ŸŒŸ ๐Ÿป ๐Ÿš€ ๐Ÿ โŒš ๐Ÿ’ก ๐Ÿ’Ž
// ๐Ÿ”ฎ ๐Ÿ’ฃ โš– โณ ๐Ÿ”‘ ๐Ÿบ ๐Ÿ”ญ ๐Ÿ”ฌ ๐Ÿ“ฏ ๐Ÿ–‡ โœ‚ ๏ธ ๐Ÿ“
// ๐Ÿ”“ ๐Ÿ’ฏ โšœ โ™ป ๏ธ โœ… ๐ŸŒ€ ๐Ÿ”Š ๐Ÿ”‡ ๐Ÿƒ ๐ŸŽถ ใ€ฐ โžฐ
// ๐Ÿ†– ๐Ÿ“ถ ๐ŸŽฆ ๐Ÿ”„ โ†ช ๏ธ โ†ฉ ๏ธ ๐Ÿ” ๐Ÿ”‚ โ™  ๏ธ โ™ฃ ๏ธ โ™ฅ ๏ธ โ™ฆ ๏ธ
// U1F600 U1F601 U1F602 U1F606 U1F605 U1F607 U1F61D U1F914 U1F62B U1F616 U1F631 U1F62D
// U1F4A9 U1F47B U1F64C U26A1(UFE0F) U1F4AB U1F31F U1F37B U1F680 U1F3C1 U231A(UFE0F) U1F4A1 U1F48E
// U1F52E U1F4A3 U2696 U23F3 U1F511 U1F3FA U1F52D U1F52C U1F4EF U1F587 U2702(UFE0F) U1F4D0
// U1F513 U1F4AF U269C U267B(UFE0F) U2705 U1F300 U1F50A U1F507 U1F0CF U1F3B6 U3030 U27B0
// U1F196 U1F4F6 U1F3A6 U1F504 U21AA(UFE0F) U21A9(UFE0F) U1F501 U1F502 U2660(UFE0F) U2663(UFE0F) U2665(UFE0F) U2666 UFE0F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment