tweecode/twine

Strange characters produced by emacs keybindings

kai-qu opened this issue · 3 comments

This happens in Twine 1.4.1 on OS X 10.7.4:

screenshot 2014-04-18 13 01 28

Not sure what the symbols are, and the cursor doesn't move either (e.g. C-e doesn't move to the end of the line). Is there some way I could use emacs keybindings in Twine?

Simple answer: Not Really.

Longer answer:
Twine's passage editor is built using the wxPython StyledTextCtrl control, which itself is an implementation of Scintilla, and Scintilla itself only uses/understands single-keystroke commands. (eg. a single key press with (or without) a modifier key)

So to support emac keybindings two things would have to be done:

  1. Modify the widget to support multi-keystroke commands. (eg. a series of key presses with (or without) a modifier key)
  2. Implement all the emac functionality that happens when those commands are issued.

This will probably never get off the ground, regrettably.

I added support for the OSX system default emacs hotkeys to my fork. It's super hacky and shouldn't be merged back, but if anyone else is looking for a whatever-works style solution, they can find it at https://github.com/gdbing/twine