Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

Get scroll wheel to work under X #50

Closed masinter closed 3 years ago

masinter commented 4 years ago

@nbriggs

X11 represents the scroll wheel as mouse buttons 4 and 5, and each click of the wheel gives you a mouse-button-N-press/mouse-button-N-release, where N=4 is one direction and N=5 is the opposite direction.

I think there is room in the mouse button representation word to add buttons 4 and 5. I'm not sure how we'd wire it up to do scrolling though. There's already Lisp code in LLKEY to handle mouse chording (fake the middle button if you have only an OSD two-button mouse on your DLion) and I suspect that that is at least at the right level in the system. I don't think Interlisp-D ever used the Dorado 5-key keyset, did it? @hjellinek I'm not aware of any official use or high-level support for the 5-key keyset, but I vaguely recall connecting one - I'm guessing to a Dolphin - and being able to detect key up/down for each key in Interlisp. I even had Brad, our AI Systems hardware tech, build me one from pushbuttons and other odds and ends.

(taking emails to mailing list and making issues)

nbriggs commented 4 years ago

The scroll-wheel is indistinguishable from the mac trackpad vertical scrolling action (X mouse buttons 4 and 5) and the trackpad horizontal scrolling gives you buttons 6 and 7.

I found that there are \KEYNAMES for the Dolphin/Dorado key set already in the system (PAD1..PAD5, aka LEFTKEY, LEFTMIDDLEKEY, MIDDLEKEY, RIGHTMIDDLEKEY, RIGHTKEY plus there are a few other aliases based on the numeric keypad keys) and I've experimented with adding code to wire the X events up to 4 of the key-set keys -- not clear what the right assignment would be, though perhaps it doesn't matter. Given that it's possible to detect the keys, there's still a bunch of design around the user interaction and coding to make it work as a scrolling function (if the cursor is in the scroll bar, each keydown/keyup event scrolls by some amount from the current position?)

masinter commented 4 years ago

This is just one of a set of related issues to make the keyboard and mouse interactions match more closely modern expectations. I'd suggest trying to set up key actions following user interface guidelines for Mac, Windows, Linux Emacs for line editing on input, control character interrupts and reset. In Emacs, Lisp mode for current common lisp programmers.

nbriggs commented 4 years ago

The "help wanted" in this involves working in the Interlisp code, at the level of LLKEY and friends, which is a very delicate part of the system... NOT a job for beginners.

masinter commented 4 years ago

"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

masinter commented 3 years ago

This is addressed by the WHEELSCROLL file in Lispusers