Guide
Android keyboard with function keys: F1 to F24 for terminal emulation on handhelds
Android’s default on-screen keyboard sends no key events to current apps – and so no function keys either. For terminal emulation (5250, 3270, VT) on a handheld, F1–F24 and special keys such as Esc and Insert therefore come from the device’s hardware keypad, the emulator’s own toolbar, an external keyboard or an on-screen keyboard with function keys, such as those some device makers ship. 5250 and 3270 emulators usually map F13–F24 to Shift+F1…F12; Android itself has had key codes of its own for them only since version 16.
Why Android keyboards show no function keys
On Android, on-screen keyboards usually deliver text: they hand the app finished characters, not individual key presses. The Android documentation says explicitly that a key press on an on-screen keyboard need not produce a key event at all. Android even discourages keyboards from sending such events, and Android’s default on-screen keyboard sends none to current apps.
Function keys are not characters, though. A terminal emulator can only receive F1, Insert, Home or the arrow keys from a keyboard as key events with a key code. An on-screen keyboard for terminal emulation therefore has to send these keys deliberately as key events – which is what sets it apart from a keyboard for writing.
Beyond F12 it gets tight for Android itself: key codes for F1 to F12 have existed since Android 3.0, those for F13 to F24 only since Android 16 (API level 36). On devices with Android 15 or earlier, F13 has no key code of its own – and even from Android 16 on, the new codes only help if the emulator handles them.
F13–F24, Field Exit and Reset: how 5250 and 3270 emulators map them
Applications on IBM i (5250) and on the mainframe (3270) use 24 function keys; a PC keyboard has twelve. Emulators therefore usually put F13–F24 – called PF13–PF24 in IBM’s layout – on Shift+F1 to Shift+F12. That is the default layout IBM documents for its 5250 and 3270 emulation on the PC, and other emulators ship with the same mapping.
The same goes for 5250 keys that a PC keyboard does not have at all. In IBM’s default layout, Field Exit sits on the Enter key – on the main keyboard and the numeric keypad –, the Enter (send) function on the right Ctrl key, Reset on the left Ctrl key and Attention on Esc. Other emulators use other keys – Field Exit on Ctrl+Enter, for example. What a key on the handheld has to send is therefore defined by your emulator’s key mapping, which can usually be changed there as well.
With VT emulation, it depends on the terminal being emulated which function keys exist – up to F20, depending on the type – and which keys they sit on.
Ways to get function keys on a handheld
The device’s hardware keypad
On handhelds with a keypad, function keys can be secondary functions of other keys, reached with Shift or a colour-coded function key; some models are available with keypad variants for 5250, 3270 or VT emulation. Real keys take up no screen space. Which F-keys exist and how they are mapped depends on the model and keypad variant, though – and touch-only devices have none.
The terminal emulator’s toolbar
Terminal emulators for Android can bring their own toolbar or keyboard with function keys and macros, and let you map the device’s hardware keys to emulator functions. Because the emulator knows its own functions, such a toolbar can also trigger Field Exit or Reset directly. But it only exists in that one app, takes up screen space and is set up per app.
External keyboard via Bluetooth or USB
Android also supports full-size, PC-style external keyboards. F1–F12 then arrive as real keys, F13–F24 as Shift+F1…F12 if the emulator maps them that way. Convenient for longer input at a fixed spot; with the handheld in your hand it is an extra device that has to be paired or plugged in.
General on-screen keyboards with F-keys
There are on-screen keyboards for Android with a row of function keys. For work with a terminal emulator the details matter: whether they send F13–F24, whether Esc, Insert, Home/End and the arrow keys are included, whether the keys are big enough – and whether the app asks for internet access and can be configured centrally.
On-screen keyboard for rugged handhelds
There are also on-screen keyboards built specifically for rugged handhelds – with function keys, a scan key and configuration through your MDM, depending on the product also with F13–F24 and big keys for gloves. As an Android input method, such a keyboard works in every app – in the emulator as well as in the browser or your own apps. Prerequisites: it is enabled and selected on the device, and the emulator interprets the key codes it sends as expected.
What to look for in a keyboard for terminal emulation
Hardware or on-screen – these points decide how well it works day to day:
- F13–F24: does the keyboard send them at all, and in the form your emulator expects – usually Shift+F1…F12? Try it with your emulator’s key mapping.
- Special keys: Esc, Tab, Insert (toggles between insert and overwrite), Delete, Home/End, Page Up/Down and the arrow keys. For 5250 also Field Exit and Reset – on exactly the key your emulator puts them on. Not every keyboard can send Ctrl or Alt combinations or the Enter key of the numeric keypad.
- Key size: Android recommends touch targets of at least 48 × 48 dp – larger is better, all the more with gloves. An adjustable key height helps. Some rugged devices have a touch mode for gloves that may be off out of the box.
- Numeric pad: quantities, bin locations and item numbers are often numbers, so a large numeric pad in phone or calculator order belongs in the mix. Whether it opens by itself depends on which field type the emulator reports to Android; otherwise you switch by hand.
- Scanner: a scan key on the keyboard pulls the scanner’s soft trigger – practical when you are typing on the screen anyway.
- Configuration through your MDM: with Android Enterprise, IT sets an app’s settings centrally (managed configuration) and decides which keyboards are allowed. Look for a keyboard whose layout, key size and special keys can be set the same way on every device.
- Privacy: an on-screen keyboard sees everything that is typed. When you enable one, Android warns that it “may be able to collect all the text you type” – passwords included. Check whether the keyboard has internet access, keeps a dictionary or stores what is typed.
Industrial Keyboard: the rugged-device keyboard by ICT Baden
Industrial Keyboard is our on-screen keyboard for rugged Android devices with Android 8.0 or later – an Android input method that appears in every input field. The Fn tab shows F1–F12; Shift turns them into F13–F24 for one key press, after a double tap until you tap Shift again. Next to them are Esc, Tab, Insert, Delete, Home, End, Page Up/Down and the arrow keys. To keep F1–F12 always in view, switch on the fixed function key row above the letters; F13–F24 and the other special keys stay on the Fn tab.
Industrial Keyboard sends F1–F12 as the key codes KEYCODE_F1 to KEYCODE_F12 and F13–F24 as Shift+F1…F12 – the mapping IBM documents for 5250 and 3270 sessions on the PC. This applies on every Android version from 8.0 – including devices that do not know key codes of their own for F13–F24 yet. Esc, Insert, Home and the other special keys arrive as key events too, letters and digits as text.
Template for terminal emulation
The
terminal-emulation.jsontemplate sets a dark theme, the fixed F-key row, Esc on the programmable key of the letter page and Tab instead of + on a programmable key of the numeric pad, and switches off automatic capitalisation. It also adds a Host tab with F13–F24, Page Up/Down, Send (Enter) and the keys “Field exit” and “Reset”. In the template, “Field exit” sends Tab and “Reset” sends Esc.Big keys for gloves
Key height 70–160 % – 100 % is a 54 dp row, and 120–140 % is recommended for gloves. Plus a preview above the finger, a high-contrast theme and a vibration that can be set to 30–40 ms so that it can be felt through gloves.
Scan key
The scan tab has a large trigger pad: tap for one scan, hold for continuous scanning. The keyboard detects Zebra DataWedge and Honeywell by itself and triggers other scanner apps by intent. The simplest way to get the barcode into the field is the scanner’s own keystroke output. Scans that only arrive as a broadcast can be typed by the keyboard – off by default, never into password fields and not into fields without a text editor, which some terminal emulators use.
Custom keys and macros
Extra tabs and keys are defined in JSON, with no app update – for example
{F13},{TAB}{TAB}or{ESC}{F3}. Macros know Tab, Enter, Esc, Backspace, Delete, Insert, Home, End, Page Up/Down, the arrow keys and F1–F24; Ctrl and Alt combinations and the Enter key of the numeric keypad are not among them.Central configuration
Managed configuration from any EMM (key
config_json), a configuration file – on Zebra devices also in/enterprise/usr– or a StageNow broadcast; an admin password protects the settings. On Zebra devices an MX profile (UI Manager) makes Industrial Keyboard the default keyboard.No internet
No internet permission, no dictionary, nothing you type is stored or learned.
Honestly: whether your emulator reads Shift+F1…F12 as F13–F24, and what it does with Tab, Esc and Enter, is up to its key mapping – in IBM’s default PC layout, Field Exit sits on Enter, send on the right Ctrl key and Reset on the left one (see above). So try the template with your emulator first and, where needed, adjust the emulator’s mapping or the output of the keys. The Honeywell trigger follows the vendor documentation and has not been tested on a Honeywell device yet; Google Play is prepared but not published yet. Industrial Keyboard (version 2.1.1) is free of charge under the MIT licence. The download follows with the public release.
Our product
Industrial Keyboard – On-screen keyboard for rugged Android devices
On-screen keyboard for rugged Android devices: F1–F24, Esc, Insert and arrow keys, big keys for gloves, a scan key and configuration through your MDM – no internet permission.
· Coming soon
The options compared
| Option | F1–F12 | F13–F24 | Esc, Insert, Home, arrows | Works in | Extra device | Central configuration |
|---|---|---|---|---|---|---|
| Device’s hardware keypad | depends on the model, sometimes via Shift or a colour key | depends on model and keypad variant | depends on the model | every app | no | depends on the vendor |
| Emulator’s toolbar | usually yes | depends on the emulator | depends on the emulator | that emulator only | no | depends on the emulator |
| External keyboard (Bluetooth, USB) | yes | as Shift+F1…F12, if the emulator maps them that way | yes | every app | yes | – |
| General on-screen keyboard with F-keys | depends on the app | depends on the app | depends on the app | every app | no | depends on the app |
| Rugged-device keyboard, e.g. Industrial Keyboard | yes: Fn tab or fixed row | yes, as Shift+F1…F12 | yes, on the Fn tab | every app | no | yes: managed configuration, file, StageNow |
“Depends on …”: this differs from device to device and from app to app. Whether an emulator reads Shift+F1…F12 as F13–F24 is defined by its key mapping. Android has key codes of its own for F13–F24 only from Android 16 on.
Which option fits when?
-
Handhelds with a keypad in the right variant
The device’s function keys – the manual says which key sends what.
-
Only one emulator in use, with its own toolbar
The emulator’s toolbar – it can also trigger functions such as Field Exit and Reset directly.
-
Touch devices without a keypad, several apps
An on-screen keyboard for rugged handhelds such as Industrial Keyboard: F1–F24 and special keys in every app, big keys and a scan key.
-
Lots of text at a fixed spot
An external keyboard via Bluetooth or USB.
-
Many devices, set up the same way
A keyboard that can be configured through your MDM, plus the list of allowed keyboards in the MDM.
-
Working with gloves
Big, adjustable keys and – if the device has one – the touch mode for gloves.
Frequently asked questions
Is there an Android keyboard with F13 to F24?
Yes, Industrial Keyboard for example: the Fn tab shows F1–F12, and with Shift F13–F24. They are sent as Shift+F1…F12, the usual mapping in 5250 and 3270 emulators; whether your emulator reads them that way is defined by its key mapping. Industrial Keyboard (version 2.1.1) is free of charge under the MIT licence. The download follows with the public release.
Does Android have key codes for F13 to F24?
Only since Android 16 (API level 36): KEYCODE_F13 to KEYCODE_F24 were added there, up to Android 15 there are key codes for F1 to F12 only – and an app has to handle the new codes too. For older devices, Shift+F1…F12 remains – the mapping that 5250 and 3270 emulators also use on a PC keyboard.
How do I get the Field Exit key for 5250 onto a handheld?
Field Exit has no key of its own on a PC keyboard, and emulators put it on different keys – IBM’s default layout uses the Enter key (main keyboard and numeric keypad). Check your emulator’s key mapping and, if needed, move Field Exit to a key your keyboard can send. In Industrial Keyboard’s terminal-emulation.json template the “Field exit” key sends Tab; its output can be changed in the configuration.
Does an on-screen keyboard work with gloves?
Yes, if the keys are big enough and the display recognises gloves. Android recommends touch targets of at least 48 × 48 dp, and some rugged devices have a touch mode of their own for gloves. In Industrial Keyboard the key height can be set from 70 to 160 %, with 120–140 % recommended for gloves.
Can an on-screen keyboard read what I type?
Technically yes: every keyboard sees everything typed, and Android points this out explicitly when you enable one – passwords and credit card numbers included. So check internet access, dictionaries and stored input. Industrial Keyboard has no internet permission and no dictionary, and stores or learns nothing you type.
Can the keyboard be rolled out to every device through an MDM?
Yes. An MDM with Android Enterprise distributes the app, sets the allowed keyboards and pushes the settings as a managed configuration. Industrial Keyboard takes its whole configuration in the key config_json, or as a file or by StageNow. Some MDMs make it the default keyboard directly, on Zebra devices an MX profile does; otherwise it is selected once on the device. Google Play is prepared but not published yet; how the APK reaches devices until then depends on the MDM – some require managed Google Play.
More guides
- Barcode scanner for PC: handheld scanner, webcam or screen? – Handheld scanner, webcam, screen or phone: which option fits when – compared honestly.
- Lock a Windows PC but keep the screen visible – What Win+L, screen savers and kiosk mode can do – and when a see-through screen lock is the right choice.
- Barcode scans not arriving in the browser on an Android handheld: causes and fixes – Profile, keystroke output, focus, Enter: why barcode scans go missing in the browser on Android handhelds – and which fix suits which situation.
- Find orphaned SIDs and Everyone permissions on Windows file servers – Account Unknown, Everyone can write, inheritance broken: how to find risky permissions on a file server – with built-in tools or a report.
- Check Windows hardening offline – without an agent, on plant, lab and control-room PCs – Built-in commands, central tools or a portable collector: how to check Windows hardening on plant PCs without installing anything – compared honestly.
Industrial Keyboard is an independent product of ICT Baden and is not affiliated with Zebra Technologies or Honeywell. Android is a trademark of Google LLC; IBM and IBM i are trademarks of International Business Machines Corporation; Zebra, DataWedge and StageNow are trademarks of Zebra Technologies, Honeywell is a trademark of Honeywell International; Bluetooth is a registered trademark of Bluetooth SIG, Inc. They are named only to describe features and compatibility.
Contact
Questions about your setup?
Tell us what you are looking for – we will get back to you personally.