Open rmkaplan opened 1 year ago
I'd be tempted to set it to SDL, anticipating that that's what would be determined by code that looked at the InterfacePage devconfig. Unfortunately, in both the X and SDL cases, it doesn't provide any information about how many physical keys there are present, whereas at least for the Sun type 3/4, Dorado, Dandelion, and Daybreak you could make assumptions about what the physical keyboard looked like.
This summarizes an email thread...
The function KEYBOARDTYPE is supposed to return the type of the current keyboard, with values like SUN3, DORADO, FULL-IBMPC, X.
For (MACHINETYPE)=MAIKO, it looks at the value of (UNIX-GETENV "LDEKBDTYPE".
That was set to X in my old working run-medley, but it is not defined in the release/master.. run-medley. So KEYBOARDTYPE comes back as NIL. Among other things, VIRTUALKEYBOARDS doesn't know what to do--it screws around in undesired ways, disabling the normal Meta key among other things.
Nick said: "No lisp code should really be looking at LDEKBDTYPE - that was to help Maiko get the right keyboard mapping internally when the SunOS ioctl() calls failed. Setting it blindly to “X” was causing trouble when running “ldesdl” - because the keyboard mapping is not the same as “X”.
KEYBOARDTYPE should be looking at the InterfacePage devconfig field to get the keyboard type. In the C code, it’s a 16-bit word, but in the Lisp code in LLKEY’s \KEYBOARDEVENTFN (and possibly other functions) that gets LOGAND’ed with 7 — not so helpful trying to store values like (decimal) 10 in a 3-bit field. The next 4 bits (not 5) are used for the display type in library/MAIKOCOLOR, in a couple of macros to see if it’s a “cgthree” or a “cgsix” color display board.
For now, you could set the environment variable to “X” as long as you’re not running the ldesdl code, but we should probably fix the use of the devconfig field to give another bit to the keyboard type, fixing the macros in MAIKOCOLOR which are not currently used."
It appears that this requires coordinated changes in MAIKO, MAIKOCOLOR, as well as KEYBOARDTYPE.
Until then, what should LDEKBDTYPE be set to for the sdl code?