Re: incorrect keyboard mapping on MacOS Lion
Status: Beta
Brought to you by:
felfert
From: Sergey S. <sst...@an...> - 2013-08-23 15:00:55
|
On 8/21/2013 4:21 PM, Chris wrote: > > "Chris" <ch...@cc...> wrote on 21/08/2013 21:10:29: > > > Well, let's try with linux and a UK (gb) keyboard anyway . . . > > > > The workstation :- > > > > _XKB_RULES_NAMES(STRING) = "evdev", "evdev", "gb", "", "" > > > > > > As I normally run with no keyboard parameter change > > > > NX> 105 startsession --session="Server" . . . > > > > --keyboard="evdev/gb" > > > > Info: Using /usr/bin/nxacl to change session parameters or deny session. > > > > keyboard=evdev/gb > > > > _XKB_RULES_NAMES(STRING) = "xfree86", "evdev", "gb", "", "" > > > > and > > > > nxacl changing to keyboard=query > > > > > 105 startsession --session="Server" . . . > > > > --keyboard="evdev/gb" > > > > Info: Using /usr/bin/nxacl to change session parameters or deny session. > > > > &keyboard=query > > > > _XKB_RULES_NAMES(STRING) = "xfree86", "pc102", "us", "", "" > > > > . . . and getting sore-sey at line 865 in :- > > nx-X11/programs/Xserver/hw/nxagent/Keyboard.c > > > if ((nxagentKeyboard != NULL) && (strcmp(nxagentKeyboard, "query") !=0)) > { > la la etc > } > else > { > layout = XKB_DFLT_KB_LAYOUT; > model = XKB_DFLT_KB_MODEL; > > #ifdef TEST > fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: > model [%s] layout [%s].\n", > model, layout); > #endif > } > > > and back at line 141 all becomes clear > > > #ifndef XKB_DFLT_RULES_FILE > #define XKB_DFLT_RULES_FILE "xfree86" > #endif > #ifndef XKB_ALTS_RULES_FILE > #define XKB_ALTS_RULES_FILE "xorg" > #endif > #ifndef XKB_DFLT_KB_LAYOUT > #define XKB_DFLT_KB_LAYOUT "us" > #endif > #ifndef XKB_DFLT_KB_MODEL > #define XKB_DFLT_KB_MODEL "pc102" > #endif > I passed your comment to NOMACHINE. Below is their answer: ============== After that point in the nxagent sources, "query" makes the agent ignore the layout info and fallback to a simple copy of client keymap. The purpose of option "query" is to force nxagent to copy the keyboard map of the connected client. In that case there is no need to compile a keymap basing on the layout information (model, country, etc.): if the client presents e.g. a German keyboard the agent will copy and use that keyboard. So it would work for any country. This is different from the Linux case where keyboard option would be "pc105/de": in that case the agent would compile its own keymap on the basis on the info "model=pc105" "country=Germany". We use "query" for Mac client since a long time, because we found there wasn't correct keyboard map files to build a key map for Mac layout in the X Windows systems istalled on the majority of Linuxes. ============== I think we need to try it. To my understanding, we need to patch the OpenNX osdep.c file around line 688: #if 0 // ifdef __WXMAC__ if ((_kbd[0] == '\0') || strstr(_kbd, "empty")) { strncpy(_kbd, getMacKeyboard(), sizeof(_kbd)); } #endif and replace there getMacKeyboard() by "query". The change is easy and worth trying in view of the above information from NOMACHINE, but at present we stuck on compiling OpenNX under Lion 10.8 (see details about failing to compile OpenSC in my previous post). Can anyone help please? Thanks, Sergey |