dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

Launcher line-editing key bindings

Open alterae opened this issue 2 years ago • 2 comments

In the DFHack launcher some key bindings I would expect to find in a command-line seem to be missing. Notably, tab completion (which works in some 0.47 versions of DFHack that I've tried), and the Ctrl+{A,E,U} shortcuts for jumping to the beginning of the line, jumping to the end of the line, and clearing all text from the beginning of the line to the cursor, respectively.

These shortcuts are present in the default configurations of most command-line shells and their absence here interacts poorly with my muscle memory.

alterae avatar Dec 04 '23 16:12 alterae

Tab completion is blocked on https://github.com/Putnam3145/Dwarf-Fortress--libgraphics--/pull/4 Until then, there's the (awkward) Shift-Right

Ctrl-a used to mean "beginning of line" but it conflicted with too many other onscreen hotkeys in other tools with EditField widgets, so it's commented out. Now I'm waiting on the aforementioned blocker so we can use Home and End. I also intend to change Ctrl-B and Ctrl-F to Ctrl Left and Right to free up more hotkeys and align the cursor keys more to what most players expect.

Delete to end of line would be a good addition. That's Ctrl-k in my muscle memory, though

myk002 avatar Dec 04 '23 17:12 myk002

Note: ctrl-left and right are workspace-switching keys on macOS (last I checked, anyway). We may want alternatives. Alt-left/right are typical forward/back word keys there.

I would recommend additional interface_key names more like BACK_WORD if that's your intent, to allow users to rebind them without causing confusion. I guess this feedback is probably better for that PR.

lethosor avatar Dec 04 '23 19:12 lethosor