diff options
author | Andres Gomez <andres.gomez@jolla.com> | 2015-05-28 19:48:10 +0300 |
---|---|---|
committer | Sergey Udaltsov <sergey.udaltsov@gmail.com> | 2016-01-14 01:16:33 +0000 |
commit | 09b8c8d782a00ea89a98e80de1b5dfe97981ea6b (patch) | |
tree | 1d65b36639c9b6f8add2467bfd762f366f87716a | |
parent | d5090d4ad9addd2247f4a44e13a4a46be9c98d8c (diff) | |
download | xkeyboard-config-09b8c8d782a00ea89a98e80de1b5dfe97981ea6b.tar.gz |
Added sbj keymap for Jolla phone
This extended keymap includes keycodes beyond the
255 which are not handled by X11 so it is only
suitable for the use with libraries that support
extended keycodes, like libxkbcommon.
https://bugs.freedesktop.org/show_bug.cgi?id=92238
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | keycodes/Makefile.am | 1 | ||||
-rw-r--r-- | keycodes/jolla | 10 | ||||
-rw-r--r-- | rules/base.lists.part | 3 | ||||
-rw-r--r-- | rules/base.ml1_s.part | 1 | ||||
-rw-r--r-- | rules/base.ml_s.part | 2 | ||||
-rw-r--r-- | rules/evdev.m_k.part | 1 | ||||
-rw-r--r-- | symbols/Makefile.am | 2 | ||||
-rw-r--r-- | symbols/jolla_vndr/Makefile.am | 4 | ||||
-rw-r--r-- | symbols/jolla_vndr/sbj | 57 |
10 files changed, 81 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 2e72577..d0e1178 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,7 @@ symbols/Makefile symbols/digital_vndr/Makefile symbols/fujitsu_vndr/Makefile symbols/hp_vndr/Makefile +symbols/jolla_vndr/Makefile symbols/macintosh_vndr/Makefile symbols/nec_vndr/Makefile symbols/nokia_vndr/Makefile diff --git a/keycodes/Makefile.am b/keycodes/Makefile.am index 78a0355..e05d77d 100644 --- a/keycodes/Makefile.am +++ b/keycodes/Makefile.am @@ -11,6 +11,7 @@ evdev \ fujitsu \ hp \ ibm \ +jolla \ macintosh \ olpc \ sony \ diff --git a/keycodes/jolla b/keycodes/jolla new file mode 100644 index 0000000..1a4d6ac --- /dev/null +++ b/keycodes/jolla @@ -0,0 +1,10 @@ +default +xkb_keycodes "jolla" { + + // These keycodes are beyond the X11 255 limit value so it would + // only be valid for the use with SW which supports extended keycodes, + // like xkbcommon. + + <I264> = 264; // Jolla phone has the wired headset button sending this keycode + +}; diff --git a/rules/base.lists.part b/rules/base.lists.part index f8dcf3b..a25ee54 100644 --- a/rules/base.lists.part +++ b/rules/base.lists.part @@ -8,6 +8,9 @@ // PC models ! $pcmodels = pc101 pc102 pc104 pc105 +// Jolla devices and keyboards +! $jollamodels = jollasbj + // Microsoft models (using MS geometry) ! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose diff --git a/rules/base.ml1_s.part b/rules/base.ml1_s.part index 1a990b0..ae07bfa 100644 --- a/rules/base.ml1_s.part +++ b/rules/base.ml1_s.part @@ -1,5 +1,6 @@ ataritt * = xfree68_vndr/ataritt(us)+%l[1]%(v[1]) amiga * = xfree68_vndr/amiga(usa1)+%l[1]%(v[1]) + jollasbj * = jolla_vndr/sbj(common)+%l[1]%(v[1]) $sun $sun_custom = pc+sun_vndr/%l[1]%(v[1]) macintosh_old us = macintosh_vndr/us(oldmac) macintosh_old $macvendorlayouts = macintosh_vndr/us(oldmac)+macintosh_vndr/%l[1]%(v[1]) diff --git a/rules/base.ml_s.part b/rules/base.ml_s.part index 76c05d2..481b44a 100644 --- a/rules/base.ml_s.part +++ b/rules/base.ml_s.part @@ -5,6 +5,8 @@ classmate us = pc+%l(classmate) empty * = empty(basic) * empty = empty(basic) + jollasbj $nonlatin = jolla_vndr/sbj(common)+us+%l%(v):2 + jollasbj * = jolla_vndr/sbj(common)+%l%(v) $sun $sun_custom = pc+sun_vndr/%l%(v) pc98 nec_vndr/jp = nec_vndr/jp(pc98) macintosh_old us = macintosh_vndr/us(oldmac) diff --git a/rules/evdev.m_k.part b/rules/evdev.m_k.part index 783326b..082f30c 100644 --- a/rules/evdev.m_k.part +++ b/rules/evdev.m_k.part @@ -1,5 +1,6 @@ pc98 = evdev(pc98) applealu_jis = evdev+macintosh(jisevdev) + $jollamodels = evdev+jolla(jolla) olpc = evdev+olpc(olpc) olpcm = evdev+olpc(olpcm) * = evdev diff --git a/symbols/Makefile.am b/symbols/Makefile.am index 3226d41..3f00283 100644 --- a/symbols/Makefile.am +++ b/symbols/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = digital_vndr fujitsu_vndr hp_vndr macintosh_vndr nec_vndr nokia_vndr sharp_vndr sgi_vndr sony_vndr sun_vndr xfree68_vndr +SUBDIRS = digital_vndr fujitsu_vndr hp_vndr jolla_vndr macintosh_vndr nec_vndr nokia_vndr sharp_vndr sgi_vndr sony_vndr sun_vndr xfree68_vndr symbolsdir = $(xkb_base)/symbols symbols_DATA = \ diff --git a/symbols/jolla_vndr/Makefile.am b/symbols/jolla_vndr/Makefile.am new file mode 100644 index 0000000..7e43bb3 --- /dev/null +++ b/symbols/jolla_vndr/Makefile.am @@ -0,0 +1,4 @@ +symbolsdir = $(xkb_base)/symbols/jolla_vndr + +dist_symbols_DATA = \ +sbj diff --git a/symbols/jolla_vndr/sbj b/symbols/jolla_vndr/sbj new file mode 100644 index 0000000..d2388c3 --- /dev/null +++ b/symbols/jolla_vndr/sbj @@ -0,0 +1,57 @@ +// Instructions +// +// 1. Set basic layout by: +// setxkbmap -rules evdev -model jollasbj -layout cz +// +// 2. Set variant by: +// setxkbmap -rules evdev -model jollasbj -layout cz -variant qwerty +// In practice this is equivalent to: +// setxkbmap -rules evdev -model jollasbj -layout cz_qwerty +// However, the latter form isn't portable so always use the -variant option. +// +// 3. Set multilayout by: +// setxkbmap -rules evdev -model jollasbj -layout "us,cz" -variant ",qwerty" -option grp:ctrl_shift_toggle +// This sets the basic us layout active. You can switch to qwerty +// variant of cz layout by pressing ctrl+shift. +// +// Pitfalls +// +// 1. Many to one mappings +// +// Higher level input method components don't necessarily handle many to +// one mappings correctly. They may assume that there exists only a one +// to one mapping between a hardware key and a symbol. Therefore you +// should take care not to introduce many to one mappings for keys that +// are going to be reverse mapped from a symbol to a hardware key. +// +// Currently at least the modifier keys are affected. Clients may set +// states, such as autorepeat, for hardware keys by reverse mapping a +// modifier symbol to a hardware key and then setting the state for the +// first hardware key that maps to the symbol. The correct way would be +// to modify the state of all hardware keys mapping to a given symbol. +// +// We are nice and keep the mappings one to one for clients that don't +// choose to handle many to one mappings. + + + +default partial alphanumeric_keys +xkb_symbols "common" { + include "pc(pc105)" + include "jolla_vndr/sbj(common-keys)" + + // This section should not be included by any other section. It's + // referenced only once by rule file to allow multiple layout + // configurations. +}; + +partial hidden alphanumeric_keys +xkb_symbols "common-keys" { + + // These keycodes are beyond the X11 255 limit value so it would + // only be valid for the use with SW which supports extended keycodes, + // like xkbcommon. + + // generated from the headset, must always be in the map. + key <I264> { [ XF86Phone ] }; +}; |