// ### A LINGUIST'S XKB KEYBOARD // changelog: // 2009.11.07 Removed "KP_" from the keypad: fixed Vim but still TODO in Chrome Cyrillic: Switched guillemots and apostrophes Fixed Ctrl-x Added Latin l under RAlt // 2009.07.06 First public version // 1. What is it? // 2. How do I install it? // 3. How do I use it? // 4. How do I adapt to my needs? // ### 1. What is it? // It's something I've been doing for my own use for some time, and finally decided to share. It's a mixture of different ideas I have about what a keyboard should work like to be comfortable in a linguist's work. If you're not a linguist, you're probably going to find it useless and unnecessarily complicated on the whole. You might however, find a thing or two you'll like. Read more in 3. (3.5. is my favourite bit.) // There's no guarantee whatsoever. If it doesn't do what you like, formats your drive or seduces your child, you can't blame me. // Note to British and Americans: No, there's no IPA here. IPA is ridiculously inconsequent, complicated and detailed in a degree verging on utter uselessness for any conceivable purpose whatsoever. I don't use it, I see no reason for anyone to use it, and I can't understand why you do use it after all. If you want a good phonetic transcription, go for UPA. // ### 2. How do I install it? // Drop it in /usr/share/X11/xkb/symbols and restart the X server (ctrl-alt-bckspace, or just reboot). It should be automatically detected. // If you use some fancy desktop environment, you might need to play with the files in /usr/share/X11/xkb/rules or probably something else, too. I don't know, sorry. // To turn it on, you can either issue "setxkbmap lng -variant " from the console or use whatever your desktop environment provides. // ### 3. How do I use it? // There are five layouts: basic (Latin), Arabic, Cyrillic, Greek and Hebrew. All are thoroughly Latin-based, i.e. with e.g. the "b" key you get: b, ب, б, β and ב. // The first part of the config, called "basic", is included in all the layouts. Essentially, it does seven things: // 1. It turns on lots of dead keys. All are available with RALT (= Right Alt) and assigned to keys they more or less look like, e.g. RALT-; + u = ü, RALT-- + u = ū. This works for different layouts: RALT-; + у = ӱ (Cyrillic), ῡ (Greek) &c. // 2. It turns on non-breaking spaces and en- and em-dashes with RALT and space and the equal (plus) key. // 3. It makes Shift-Bckspace work like Del. // 4. It makes the keypad work like PgUp, Home &c. – with and without Shift (with NumLock off, obviously). // 5. It turns Caps Lock into a regular Shift. // 6. Here's the fun bit: it changes the left modifier keys to a Mac-ish layout. You probably have LCTL-(Fn)-LWIN-LALT. If you've worked on a Mac for longer than a day, you should understand how illogical and uncomfortable this is. So, here goes: now you have LWIN-(Fn)-LALT-LCTL. You'll thank me later ;) // And joy oh joy, with the current definition you get to use your favourite keyboard shortcuts in all layouts, I mean you can still Ctrl-C and Ctrl-V things in Cyrillic, Arabic and everything else. // 7. And finally, it assigns the third level shift (access to the third and fourth columns) to RALT, and the Compose key (see my .XCompose) to RCTL. // The non-Latin layouts are, as I said, thoroughly Latin-based, i.e. you actually type the transcription. I'm not going to list them all here. You can read the config, it's pretty easy: // – &c. reads as follows: A is not important; B is the second row on the keyboard from the bottom (i.e. zxc…), 02 is the second key from the left (x). // – {[ … ]};: the first column is a normal keypress, without any modifiers; the second is just Shift; the third is RALT (in my config, you can play with "level3(ralt_switch)", and the fourth is RALT-Shift. // ### 4. How do I adapt to my needs? // First things first, the license: it's GPL, or in other words if it doesn't do exactly what you need, just change whatever you please and do whatever you like with the modified version. Just credit me somewhere, please. // Should you need any help, I'll do my best to help you but I can't promise anything. You can contact me at kamil{-dot-}stachowski{-the-funny-little-sign-}gmail{-dot-}com. // The xkb config format is relatively clear. Different parts of the config are commented, so you should be able to find quite easily what you need to change or delete to get the functionality you need, or get rid of something you don't need. // There aren't too many tutorials on the web, or they don't really give you the information you need, or at least not in the form you could easily understand. This config is more a result of trial and error. I'm afraid trial and error is the best advice I can give you. // There's a little more information in 3. // If you start playing around with the config, you should remember that the first part, called "basic", is included in all layouts. If you modify anything in it, it will affect all of them at the same time. //---basic------------------------------------------------------------------------------------------------------- partial default alphanumeric_keys modifier_keys xkb_symbols "basic" { name[Group1]="basic"; include "latin" key.type[Group1]="FOUR_LEVEL"; // dead keys key {[ grave, asciitilde, dead_tilde, dead_tilde ]}; key {[ 2, at, dead_abovering, dead_abovedot ]}; key {[ 4, dollar, EuroSign, currency ]}; key {[ 6, asciicircum, dead_circumflex, dead_circumflex ]}; key {[ 9, parenleft, U032F, U032F ]}; key {[ 0, parenright, dead_breve, dead_breve ]}; key {[ minus, underscore, dead_macron, dead_macron ]}; Key {[ backslash, bar, dead_grave, dead_grave ]}; key {[ semicolon, colon, dead_diaeresis, dead_diaeresis ]}; key {[ apostrophe, quotedbl, dead_doubleacute, dead_doubleacute ]}; key {[ comma, less, dead_cedilla, dead_hook ]}; key {[ period, greater, dead_caron, dead_belowdot ]}; key {[ slash, question, dead_acute, dead_horn ]}; // some extra stuff key {[ space, space, nobreakspace, nobreakspace ]}; key {[ equal, plus, endash, emdash ]}; key.type[Group1]="TWO_LEVEL"; // shift-backspace = delete key {[ BackSpace, Delete ]}; // keypad home, end &c. working with shift key {[ End, End ]}; key {[ Down, Down ]}; key {[ Next, Next ]}; key {[ Left, Left ]}; key {[ Begin, Begin ]}; key {[ Right, Right ]}; key {[ Home, Home ]}; key {[ Up, Up ]}; key {[ Prior, Prior ]}; key.type[Group1]="ONE_LEVEL"; // begone, foul caps key {[ Shift_L ]}; modifier_map Shift { }; // lwin - lalt - lctl, with ctrl working in non-latin; lalt still doesn't key {[ Super_L ]}; key {[ Alt_L ]}; key {[ ISO_Level5_Shift ]}; modifier_map Mod1 { }; modifier_map Control { }; // ralt switch dead &c. + rctrl compose include "level3(ralt_switch)" include "compose(rctrl)" }; //---arabic------------------------------------------------------------------------------------------------------ partial alphanumeric_keys modifier_keys xkb_symbols "arabic" { name[Group1]="arabic"; include "lng(basic)" key.type[Group1]="EIGHT_LEVEL_ALPHABETIC"; key {[ 0x1000661, exclam, 0x1000661, 1, 1, 1 ]}; key {[ 0x1000662, at, 0x1000662, 2, 2, 2 ]}; key {[ 0x1000663, numbersign, 0x1000663, 3, 3, 3 ]}; key {[ 0x1000664, dollar, 0x10006f4, 4, 4, 4 ]}; key {[ 0x1000665, Arabic_percent, 0x10006f5, 5, 5, 5 ]}; key {[ 0x1000666, asciicircum, 0x10006f6, 6, 6, 6 ]}; key {[ 0x1000667, ampersand, 0x1000667, 7, 7, 7 ]}; key {[ 0x1000668, asterisk, 0x1000668, 8, 8, 8 ]}; key {[ 0x1000669, parenleft, 0x1000669, 9, 9, 9 ]}; key {[ 0x1000660, parenright, 0x1000660, 0, 0, 0 ]}; key {[ Arabic_qaf, Arabic_qaf, Arabic_qaf, Arabic_qaf, q, Q ]}; key {[ Arabic_waw, Arabic_waw, Arabic_damma, Arabic_damma, w, W ]}; key {[ Arabic_heh, Arabic_tehmarbuta, Arabic_kasra, Arabic_kasra, e, E ]}; key {[ Arabic_ra, Arabic_ra, Arabic_ghain, Arabic_ghain, r, R ]}; key {[ Arabic_teh, Arabic_tah, Arabic_teh, Arabic_tah, t, T ]}; key {[ 0x10006cc, Arabic_yeh, 0x10006cc, Arabic_yeh, y, Y ]}; key {[ Arabic_waw, Arabic_waw, Arabic_damma, Arabic_damma, u, U ]}; key {[ 0x10006cc, Arabic_yeh, Arabic_kasra, Arabic_kasra, i, I ]}; key {[ Arabic_waw, Arabic_waw, Arabic_sukun, Arabic_sukun, o, O ]}; key {[ Arabic_peh, Arabic_peh, Arabic_peh, Arabic_peh, p, P ]}; key {[ Arabic_alef, Arabic_alef, Arabic_fatha, Arabic_fatha, a, A ]}; key {[ Arabic_seen, Arabic_sad, Arabic_sheen, Arabic_shadda, s, S ]}; key {[ Arabic_dal, Arabic_dad, Arabic_dal, Arabic_dad, d, D ]}; key {[ Arabic_feh, Arabic_feh, Arabic_feh, Arabic_feh, f, F ]}; key {[ Arabic_gaf, Arabic_gaf, Arabic_gaf, Arabic_gaf, g, G ]}; key {[ Arabic_hah, Arabic_heh, Arabic_hah, Arabic_heh, h, H ]}; key {[ 0x10006cc, Arabic_yeh, Arabic_kasra, Arabic_kasra, j, J ]}; key {[ Arabic_kaf, Arabic_kaf, Arabic_kaf, Arabic_kaf, k, K ]}; key {[ Arabic_lam, Arabic_lam, Arabic_lam, Arabic_lam, l, L ]}; key {[ Arabic_semicolon,colon, semicolon, colon, semicolon,colon]}; key {[ Arabic_ain, quotedbl, apostrophe, Arabic_ain, apostrophe,quotedbl]}; key {[ Arabic_zain, Arabic_zah, Arabic_zain, Arabic_zah, z, Z ]}; key {[ Arabic_khah, Arabic_khah, Arabic_khah, Arabic_khah, h, H ]}; key {[ Arabic_jeem, Arabic_jeem, 0x1000686, 0x1000686, c, C ]}; key {[ Arabic_waw, Arabic_waw, Arabic_damma, Arabic_damma, v, V ]}; key {[ Arabic_beh, Arabic_beh, Arabic_beh, Arabic_beh, b, B ]}; key {[ Arabic_noon, Arabic_noon, Arabic_noon, Arabic_noon, n, O ]}; key {[ Arabic_meem, Arabic_meem, Arabic_meem, Arabic_meem, m, M ]}; key {[ Arabic_comma, less, comma, less, comma,less]}; key {[ slash, Arabic_question_mark, slash, question, slash,question]}; }; //---cyrillic---------------------------------------------------------------------------------------------------- partial alphanumeric_keys modifier_keys xkb_symbols "cyrillic" { name[Group1]="cyrillic"; include "lng(basic)" key.type[Group1]="EIGHT_LEVEL_ALPHABETIC"; // key {[ ]}; key {[ Cyrillic_ve, Cyrillic_VE, Cyrillic_shcha, Cyrillic_SHCHA, w, W ]}; key {[ Cyrillic_ie, Cyrillic_IE, Cyrillic_e, Cyrillic_E, e, E ]}; key {[ Cyrillic_er, Cyrillic_ER, Cyrillic_er, Cyrillic_ER, r, R ]}; key {[ Cyrillic_te, Cyrillic_TE, Cyrillic_hardsign, Cyrillic_HARDSIGN, t, T ]}; key {[ Cyrillic_yeru, Cyrillic_YERU, Cyrillic_yeru, Cyrillic_YERU, y, Y ]}; key {[ Cyrillic_u, Cyrillic_U, Cyrillic_u_straight,Cyrillic_U_straight,u, U ]}; key {[ Cyrillic_i, Cyrillic_I, Ukrainian_i, Ukrainian_I, i, I ]}; key {[ Cyrillic_o, Cyrillic_O, Cyrillic_io, Cyrillic_IO, o, O ]}; key {[ Cyrillic_pe, Cyrillic_PE, Cyrillic_pe, Cyrillic_PE, p, P ]}; key {[ Cyrillic_a, Cyrillic_A, Cyrillic_ya, Cyrillic_YA, a, A ]}; key {[ Cyrillic_es, Cyrillic_ES, Cyrillic_sha, Cyrillic_SHA, s, S ]}; key {[ Cyrillic_de, Cyrillic_DE, Cyrillic_de, Cyrillic_DE, d, D ]}; key {[ Cyrillic_ef, Cyrillic_EF, Cyrillic_ef, Cyrillic_EF, f, F ]}; key {[ Cyrillic_ghe, Cyrillic_GHE, Cyrillic_ghe, Cyrillic_GHE, g, G ]}; key {[ Cyrillic_ha, Cyrillic_HA, Cyrillic_shha, Cyrillic_SHHA, h, H ]}; key {[ Cyrillic_shorti, Cyrillic_SHORTI, Cyrillic_je, Cyrillic_JE, j, J ]}; key {[ Cyrillic_ka, Cyrillic_KA, Cyrillic_ka, Cyrillic_KA, k, K ]}; key {[ Cyrillic_el, Cyrillic_EL, l, L, l, L ]}; key {[ apostrophe, quotedbl, guillemotleft, guillemotright, apostrophe,quotedbl]}; key {[ Cyrillic_ze, Cyrillic_ZE, Cyrillic_zhe, Cyrillic_ZHE, z, Z ]}; key {[ Cyrillic_ha, Cyrillic_HA, Cyrillic_shha, Cyrillic_SHHA, x, X ]}; key {[ Cyrillic_tse, Cyrillic_TSE, Cyrillic_che, Cyrillic_CHE, c, C ]}; key {[ Cyrillic_ve, Cyrillic_VE, Cyrillic_shcha, Cyrillic_SHCHA, v, V ]}; key {[ Cyrillic_be, Cyrillic_BE, Cyrillic_be, Cyrillic_BE, b, B ]}; key {[ Cyrillic_en, Cyrillic_EN, Cyrillic_en, Cyrillic_EN, n, O ]}; key {[ Cyrillic_em, Cyrillic_EM, Cyrillic_softsign, Cyrillic_SOFTSIGN, m, M ]}; }; //---greek------------------------------------------------------------------------------------------------------- partial alphanumeric_keys modifier_keys xkb_symbols "greek" { name[Group1]="greek"; include "lng(basic)" key.type[Group1]="EIGHT_LEVEL_ALPHABETIC"; // key {[ ]}; // key {[ ]}; key {[ Greek_epsilon, Greek_EPSILON, Greek_eta, Greek_ETA, e, E ]}; key {[ Greek_rho, Greek_RHO, Greek_rho, Greek_RHO, r, R ]}; key {[ Greek_tau, Greek_TAU, Greek_theta, Greek_THETA, t, T ]}; key {[ Greek_upsilon, Greek_UPSILON, Greek_upsilon, Greek_UPSILON, y, Y ]}; key {[ Greek_upsilon, Greek_UPSILON, Greek_upsilon, Greek_UPSILON, u, U ]}; key {[ Greek_iota, Greek_IOTA, Greek_iota, Greek_IOTA, i, I ]}; key {[ Greek_omicron, Greek_OMICRON, Greek_omega, Greek_OMEGA, o, O ]}; key {[ Greek_pi, Greek_PI, Greek_phi, Greek_PHI, p, P ]}; key {[ Greek_alpha, Greek_ALPHA, Greek_alpha, Greek_ALPHA, a, A ]}; key {[ Greek_sigma, Greek_SIGMA, Greek_finalsmallsigma, Greek_SIGMA, s, S ]}; key {[ Greek_delta, Greek_DELTA, Greek_delta, Greek_DELTA, d, D ]}; key {[ Greek_phi, Greek_PHI, Greek_phi, Greek_PHI, f, F ]}; key {[ Greek_gamma, Greek_GAMMA, Greek_gamma, Greek_GAMMA, g, G ]}; key {[ Greek_chi, Greek_CHI, Greek_chi, Greek_CHI, h, H ]}; key {[ Greek_iota, Greek_IOTA, Greek_iota, Greek_IOTA, j, J ]}; key {[ Greek_kappa, Greek_KAPPA, Greek_chi, Greek_CHI, k, K ]}; key {[ Greek_lamda, Greek_LAMDA, Greek_lamda, Greek_LAMDA, l, L ]}; key {[ Greek_zeta, Greek_ZETA, Greek_zeta, Greek_ZETA, z, Z ]}; key {[ Greek_chi, Greek_CHI, Greek_chi, Greek_CHI, h, H ]}; // key {[ ]}; // key {[ ]}; key {[ Greek_beta, Greek_BETA, Greek_beta, Greek_BETA, b, B ]}; key {[ Greek_nu, Greek_NU, Greek_nu, Greek_NU, n, O ]}; key {[ Greek_mu, Greek_MU, Greek_mu, Greek_MU, m, M ]}; }; //---hebrew------------------------------------------------------------------------------------------------------ partial alphanumeric_keys modifier_keys xkb_symbols "hebrew" { name[Group1]="hebrew"; include "lng(basic)" key.type[Group1]="EIGHT_LEVEL_ALPHABETIC"; key {[ hebrew_qoph, hebrew_qoph, hebrew_qoph, hebrew_qoph, q, Q ]}; key {[ hebrew_waw, hebrew_waw, hebrew_waw, hebrew_waw, w, W ]}; key {[ hebrew_he, hebrew_he, 0x10005b5, 0x10005b5, e, E ]}; key {[ hebrew_resh, hebrew_resh, hebrew_resh, hebrew_resh, r, R ]}; key {[ hebrew_taw, hebrew_tet, hebrew_taw, hebrew_tet, t, T ]}; key {[ hebrew_yod, hebrew_yod, hebrew_yod, hebrew_yod, y, Y ]}; key {[ hebrew_waw, hebrew_waw, 0x10005bc, 0x10005bb, u, U ]}; key {[ hebrew_yod, hebrew_yod, 0x10005b4, 0x10005b4, i, I ]}; key {[ hebrew_waw, hebrew_waw, 0x10005b9, 0x10005b3, o, O ]}; key {[ hebrew_pe, hebrew_finalpe, hebrew_pe, hebrew_finalpe, p, P ]}; key {[ hebrew_aleph, hebrew_aleph, 0x10005b2, 0x10005b3, a, A ]}; key {[ hebrew_samech, hebrew_samech, hebrew_shin, hebrew_shin, s, S ]}; key {[ hebrew_dalet, hebrew_dalet, hebrew_dalet, hebrew_dalet, d, D ]}; key {[ hebrew_pe, hebrew_finalpe, hebrew_pe, hebrew_finalpe, f, F ]}; key {[ hebrew_gimel, hebrew_gimel, hebrew_gimel, hebrew_gimel, g, G ]}; key {[ hebrew_chet, hebrew_chet, hebrew_chet, hebrew_chet, h, H ]}; key {[ hebrew_yod, hebrew_yod, hebrew_yod, hebrew_yod, j, J ]}; key {[ hebrew_kaph, hebrew_finalkaph, hebrew_kaph, hebrew_finalkaph, k, K ]}; key {[ hebrew_lamed, hebrew_lamed, hebrew_lamed, hebrew_lamed, l, L ]}; key {[ hebrew_ayin, hebrew_ayin, hebrew_ayin, hebrew_ayin, apostrophe,quotedbl]}; key {[ hebrew_zain, hebrew_zain, hebrew_zain, hebrew_zain, z, Z ]}; key {[ hebrew_chet, hebrew_chet, hebrew_chet, hebrew_chet, h, H ]}; key {[ hebrew_zade, hebrew_finalzade, hebrew_zade, hebrew_finalzade, c, C ]}; key {[ hebrew_waw, hebrew_waw, hebrew_waw, hebrew_waw, v, V ]}; key {[ hebrew_bet, hebrew_bet, hebrew_bet, hebrew_bet, b, B ]}; key {[ hebrew_nun, hebrew_finalnun, hebrew_nun, hebrew_finalnun, n, O ]}; key {[ hebrew_mem, hebrew_finalmem, hebrew_mem, hebrew_finalmem, m, M ]}; };