I've been playing around with some Apple II emulators for Android lately, and one of them is Apple2ix Android. It has a really nice UI and the customizable keyboard is very flexible in terms of adjusting the UI layout for both landscape and portrait modes. I'm currently trying to figure out something about its alternate keyboard setup. It uses some json files to define the keys that the alternate keyboard displays, and one of them, 00default.kbd.json, looks like this:
[
"Default Alternate Touch Keyboard",
{
"_comment" : "hex code for special glyphs",
"_AA" : "b5",
"_CTRL": "b3",
"_ESC" : "bc",
"_OA" : "81",
"_CA" : "80",
"_UP" : "8b",
"_LT" : "88",
"_RT" : "95",
"_DN" : "8a"
},
["reserved for future use"],
["reserved for future use"],
["_AA", "", "_CTRL", "", "_ESC", "", "_OA", "", "_CA", ""],
[ "", "", "", "", "", "", "", "", "", ""],
[ "", "", "", "", "", "_UP", "", "", "", ""],
[ "", "", "", "", "_LT", "_AA", "_RT", "", "", ""],
[ "", "", "", "", "", "_DN", "", "", "", ""],
[ "", "", "", "", "", "", "", "", "", ""]
]
It uses some hexadecimal codes to represent the keys of the Apple II. For example, the ESC key is represented as bc. However, its sample file does not provide all the codes. For instance, I couldn't find the codes for F1-F12. I've searched extensively online but couldn't determine which specific encoding set uses such codes. Does anyone know which encoding the Apple2ix uses? Thanks.
This is a normal keyboard:
The below is the alternative keyboard with this file 00default.kbd.json
I tested 16 codes from a0 to af. The keyboard layouts they display are as follows, but I cannot input anything. After inputting, all that is displayed are underscores _.
The json is:
[
"Default Alternate Touch Keyboard",
{
"_comment" : "hex code for special glyphs",
"_AA" : "b5",
"_CTRL": "b3",
"_ESC" : "bc",
"_OA" : "81",
"_CA" : "80",
"_UP" : "8b",
"_LT" : "88",
"_RT" : "95",
"_DN" : "8a",
"_A0" : "a0",
"_A1" : "a1",
"_A2" : "a2",
"_A3" : "a3",
"_A4" : "a4",
"_A5" : "a5",
"_A6" : "a6",
"_A7" : "a7",
"_A8" : "a8",
"_A9" : "a0",
"_A10" : "aa",
"_Ab" : "ab",
"_Ac" : "ac",
"_Ad" : "ad",
"_Ae" : "ae",
"_Af" : "af"
},
["reserved for future use"],
["reserved for future use"],
["_AA", "", "_CTRL", "", "_ESC", "", "_OA", "", "_CA", ""],
[ "_A0", "_A1", "_A2", "_A3", "_A4", "_A5", "_A6", "_A7", "_A8", "_A9"],
[ "_A10", "_Ab", "_Ac", "_Ad", "_Ae", "_UP", "_Af", "", "", ""],
[ "", "", "", "", "_LT", "_AA", "_RT", "", "", ""],
[ "", "", "", "", "", "_DN", "", "", "", ""],
[ "", "", "", "", "", "", "", "", "", ""]
]
a4.JPG
For one, the Apple II never supported F1-F12 keys, so I'm not surprised you can't find glyphs for them or ways to add them to a custom keyboard layout.
Since the keyboard layouts are using custom glyphs, I imagine the hex codes refer to a location in some bitmap stored inside the app, and not to any kind of official encoding.
Thanks for your reply, it has provided me with new ideas. It seems that I need to study the specific code implementation.
Thanks for your reply, it has provided me with new ideas. It seems that I need to study the specific code implementation.