Want consistent keybindings (as part of Modernize)
"help wanted" is different than "good first time project". In this case, what we need is someone to research what key bindings are now and what they should be. Also for window actions, menus, etc.
I don't think the fact that Interlisp pre-dated Mac and Windows and Linux UI guidelines is important to preserve
Originally posted by @masinter in https://github.com/Interlisp/medley/issues/50#issuecomment-713083301
Between TTYIN, sedit, tedit compared to Linux, Mac, Windows, emacs set up user GREET settiable (undoably) consistent set of key bindings. It is impossible to be simultaneously consistent with multiple inconsistent things, but settable key handling should allow these:
- arrow keys (left, right, up/previous, down/next)
- DEL as "delete selection" or (if nothing selected) delete forward
- CR/Enter as (submit line) even if not at end
- control-A as "select all" or "go to beginning of line"
- control-K as "delete rest of line"
For extra credit: allow the input stream to be a stdin / pipe and output stream to be a terminal with character IO
- This issue has some overlap with other keyboard issues (European keyboards) but hopefully separable
- everyone has opinions about what their fingers are trained for. We need to make reconfiguration easy (even though the underlying mechanisms are complex.
- Some things are not implemented (deleting forward, arrow keys) and it isn't just a question of key bindings
- we should mainly look at what the browsers do because
- online users are running in a browser
- browsers face the same developer dilemma of needing to support and document multiple different user preferences https://www.groovypost.com/tips/50-universal-web-browser-hotkeys/ https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/customize/shortcuts https://support.apple.com/en-us/HT201236 https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop
those links were pretty useless. Here's the beginning of a chart https://docs.google.com/spreadsheets/d/1FOkrr62TtEhhY49m9U0T_6bvqSGRQt9fBRtMDw0YKtY/edit#gid=642562870
I made good progress on the keystroke binding table: https://docs.google.com/spreadsheets/d/1FOkrr62TtEhhY49m9U0T_6bvqSGRQt9fBRtMDw0YKtY/edit#gid=79579844 and found the code for TTYIN which has lots of features I didn't know about, being assigned (hard wired) to odd keystrokes and tied up with some meta-key changes I found the table of SEdit key bindings nicely organized by function TEdit key bindings are still to be discovered. some keystrokes are owned by non-Lisp code (browser for online, windows, etc.) I tested in -nogreet LISP.Venuesysout. I didn't see cut copy or paste as those are in clipboard.
Next steps
- validate the information gathered
- complete the table
- make ttyin actions assignable
- (others as possible)
- settle on at least one but possibly more "consistent key-binding sets" for (mac/metakey) (online user) (common lisp/slime) key binding sets
- document and test
Another source of input, perhaps as much for other issues like the foreign keyboard problems, is the table in Maiko used to populate its key tables Please review https://github.com/Interlisp/maiko/blob/master/inc/XKeymap.h
It seems this is tuned for situations we don't have, and a solution will require at the very least updating this table.
https://www.oreilly.com/library/view/xlib-reference-manual/9780937175262/16_appendix-h.html seemed like a useful reference as well.
When reviewing XKeymap.h, you also need to read the code in https://github.com/Interlisp/maiko/blob/master/src/initkbd.c function make_X_keymap, which starts from the generic mapping in XKeymap.h and produces one specialized for the X server it is running against.