The client you are thinking of is xev, which can be used to display details about the keycodes and keysyms that result when you press or release any key on the keyboard.
Yes, I think the issue here is how the XQuartz server on the Mac converts the keypress into an X11 Event. XQuartz has a preference that switches the option keys between sending Mode_switch and sending Alt_L and Alt_R, but neither of these is what is desired here. Instead, as I understand it the ask is for the option keys to send Meta_L and Meta_R. The only way I know of to do something like that is to use xmodmap on the Mac. Because these are modifier keys you need to change both the keysyms and the modifer maps. I think something like this set of xmodmap commands would work as a start, though it leaves no keys assigned as mod1 modifiers. I'm not sure what the side effects of having no mod1 modifier keys are. It adds the two option keys as additional Meta keys and leaves the command keys as Meta keys as before, and it makes sure that all of the Meta keys are part of the mod2 map. clear mod1 keycode 66 = Meta_L keycode 69 = Meta_R add mod2 = Meta_L Meta_R If you want to check to see that I got the keycode numbers correct, use the xev program. If you want to make this sort of change every time you start X11 on your Mac, you can save the xmodmap commands in ${HOME}/.Xmodmap and create a ${HOME}/.xinitrc.d/30-xmodmap.sh file that looks something like this: $ cat ~/.xinitrc.d/30-xmodmap.sh [ -r "${HOME}/.Xmodmap" ] && xmodmap "${HOME}/.Xmodmap" Thanks, Mike > On Mar 31, 2022, at 6:36 AM, Perry Smith via X11-users > <x11-users@lists.apple.com> wrote: > > Interesting thought. I’m no expert either but my **guess** is the key stroke > is converted into an "X11 Event” (I think they are called) on the local side > by the X11 server — which would be XQuartz in this case. > > The .XDefaults brings up an interesting question. I need to find / remember > how to use xrdb and xmodmap. There is / was also a client that would capture > events and tell you what they were. This was used mostly when developing new > apps but seems like it might help me here. > >> On Mar 30, 2022, at 21:50, Don MacQueen <m...@comcast.net> wrote: >> >> I’m not expert at all, but it seems to me that it is the remote emacs that >> is interpreting your keystrokes, so whatever you modify, it’ll be on the >> remote system. Perhaps .emacs, perhaps .Xdefaults (or whatever the FreeBSD >> system calls that file). (i.e., tinkering with the local Quartz preferences >> won’t help). >> >> Good luck! >> >> Don MacQueen >> m...@comcast.net >> >> >> >>> On Mar 30, 2022, at 7:34 PM, Perry Smith via X11-users >>> <x11-users@lists.apple.com> wrote: >>> >>> For Emacs running directly on my Mac, I use an Emacs compiled for the Mac >>> which essentially uses NextStep for the display system. In that set up, I >>> have the option key used as meta so I hit option-X rather than command-X to >>> get M-X. >>> >>> I now have a FreeBSD system with emacs from their packaging system. I >>> start Quartz on the Mac, open an X11 terminal, ssh over to the BSD system >>> with X11 forwarding, and then start emacs which appears as an X11 client on >>> my Mac. So far so good. >>> >>> The hiccup is it wants to use command-X for M-X instead of my preference of >>> option-X. What is really odd is option-<key> produces greek. So option-W >>> option-X produces Ω≈ >>> >>> I see the XQuartz Preferences and the Input tab and I’ve fumbled around >>> each of the four buttons and none seem to address this issue. Indeed, the >>> Ω≈ output makes me think it isn’t XQuartz that is doing it but the macOS >>> system itself — but why only for XQuarts? >>> >>> Anyhow… I *think* this isn’t an emacs issue but an X11 / XQuartz / macOS >>> preferences question so I’m asking here first. >>> >>> Thank you for your time >>> Perry >>> >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> X11-users mailing list (X11-users@lists.apple.com) >>> Help/Unsubscribe/Update your Subscription: >>> https://lists.apple.com/mailman/options/x11-users/macq%40comcast.net >>> >>> This email sent to m...@comcast.net > _______________________________________________ Do not post admin requests to the list. They will be ignored. X11-users mailing list (X11-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com