Remapping Zebra MC33xx/MC93xx hardware keyboard to support local language characters
Remapping Zebra MC33xx/MC93xx hardware keyboard to support local language characters
Ian Hatton
Zebra EMEA
Updated June 2020
Overview
Many customers prefer to use a hardware keyboard for numeric+text entry and in some cases they also require the ability to enter local language characters via the hardware keyboard. This blog demonstrates a method to support this requirement using an installed soft keyboard (SIP keyboard) which also supports hardware key remapping on Zebra devices.
This technique uses a modified third party SIP keyboard , the sourcecode of which is posted at https://code.google.com/archive/p/extkeyboardremapper/ . This is a third party application which is not supported by Zebra so used at your own risk. The remap works best with a full alpha (47 key) keyboard layout but can also be used with the 38 key layout which means there are two keyboard options as shown below:
1.47 key 2. 38 key
Method
This keyboard (mySoftKeyboard.apk) allows two tables to be configured in order to translate hardware keycodes to Unicode characters. The tables are modified as follows:
- S2k.cfg – this table translates the default hardware keycodes (as defined here: https://developer.android.com/ndk/reference/keycodes_8h.html ) to any user-defined keycode e.g to translate A through Z on the MC33xx/93xx, the following S2k.cfg file will remap the default codes to one which are unused (and can therefore be remapped to alternative chars) :
30 => 188
48 => 189
46 => 190
32 => 191
18 => 192
33 => 193
34 => 194
35 => 195
23 => 196
36 => 197
37 => 198
38 => 199
50 => 200
49 => 201
24 => 202
25 => 203
16 => 232
19 => 233
31 => 234
20 => 235
22 => 236
47 => 237
17 => 238
45 => 239
21 => 240
44 => 241
- K2g.cfg – this file allows alternative characters to be mapped to keycodes in 4 states (unshifted, shifted, alt and sym). In most cases, it is only necessary to edit this file in order to support different character sets since the mapping in s2k.cfg can remain the same .
Up to now we have only tested the shifted remap since the alt and sym modes may not be supported on the target device keyboards and are not lockable (whereas shift mode is lockable on all devices) . The sample below shows the format of this file required in order to map Greek chars to the keycodes generated by the s2k.cfg file:
188 a А a a
189 b Β b b
190 c Γ c c
191 d Δ d d
192 e Ε e e
193 f Ζ f f
194 g Η g g
195 h Θ h h
196 i Ι i i
197 j Λ j j
198 k Μ k k
199 l Ν l l
200 m Ξ m m
201 n Ο n n
202 o Π o o
203 p Ρ p p
232 q Σ q q
233 r Τ r r
234 s Υ s s
235 t Φ t t
236 u Χ u u
237 v Ψ v v
238 w Ω w w
239 x x x x
240 y y y y
241 z z z z
Note that after modification , k2g.cfg has to be saved as UTF-8 in order to be readable by the keyboard application:
After edit, both files should be located in the folder /enterprise/usr on the MC33xx .
The keyboard APK (mySoftKeyboard.apk) should then be installed on the device and enabled in Settings/Languages and Input/Virtual keyboard . Note that this is a modified APK compared to the version posted in the original link above – the modification changes the path for the CFG files from the original location (/sdcard/keyremap) to the new location (/enterprise/usr). The reason for this change is that the /enterprise folder persists over an enterprise reset so the keyboard configuration can also be persisted .
If installing via StageNow using one of the internet-hosted profiles below , all installation steps will be automated .
Greek:
Hebrew:
Cyrillic:
Note that when installing using these codes , SN may report a spurious error with UIMgr (when the keyboard is selected as default input method ) – this can be ignored and the new keyboard will become the default.
Additional Steps
After installation, the new SIP keyboard will popup automatically when any input field has focus as shown below.
Press shift plus a letter (a through z) on the hardware keyboard to generate a translated character code . The default mapping of the sample keyboards should match the mapping of the same characters on a PC keyboard.
To hide the SIP keyboard, press the P2 key on the hardware keyboard – this will toggle between the multilang soft keyboard and a null keyboard (no SIP ) each time P2 is pressed.
The hardware keyboard can now be used without seeing the SIP appear on any input fields :
The files and XML code used in the Greek StageNow profile above are zipped together in the file attached to this post .
Ian Hatton
1 Replies
If you are having problems viewing the embedded images in this blog post, the original article is available as a PDF file <a href="http://zebra.airsetup.com/2019/blogs/Remapping%20Zebra%20MC33xxMC93xx%2…;