Test configuration:
- My
~/.haskeline contains just editMode: vi and comments (lines starting with #). I have confirmed it's being read by noting that the Emacs sequences Ctrl-F and Ctrl-B do not work, and start working if I comment out editMode: vi.
- I am using Stack
resolver: lts-23.24 and compiler: ghc-9.8.2, though the problem seems the same with the default ghc-9.8.4 provided by that resolver.
- I am in a urxvt terminal window and have
TERM=rxvt-unicode-256color set in my environment, though I get the same behaviour with TERM=xterm or even TERM= (no terminal set).
When I type e.g. Esc, k quickly this seems to be interpreted as a terminal function key sequence and I get a visual bell in response. Delaying for a substantial fraction of a second between the two characters (until I see the cursor move after typing Esc) does seem to correctly put me in vi normal ("command") mode.
However, I am pretty sure that, Esc, k, is not the start of a terminal function key sequence for any of the terminal definitions I've tried (and I am certain it's not for TERM=). Ought not Haskeline, when it reads an Esc followed by a character that cannot be the second character of a valid terminal function key sequence, interpret this as individual characters typed by the user? Is there a way to make this happen?
As a workaround, I'd personally be ok with being able to set the equivalent of readline's set-keymap-timeout to 0, but I cannot find such a configuration setting in the Wiki. And anyway that's still a poor solution since it would disable arrow keys etc. entirely and this would greatly annoy at least some people that I pair-program with.
There may be further discussion of this in this forum post as well.
Test configuration:
~/.haskelinecontains justeditMode: viand comments (lines starting with#). I have confirmed it's being read by noting that the Emacs sequences Ctrl-F and Ctrl-B do not work, and start working if I comment outeditMode: vi.resolver: lts-23.24andcompiler: ghc-9.8.2, though the problem seems the same with the default ghc-9.8.4 provided by that resolver.TERM=rxvt-unicode-256colorset in my environment, though I get the same behaviour withTERM=xtermor evenTERM=(no terminal set).When I type e.g.
Esc,kquickly this seems to be interpreted as a terminal function key sequence and I get a visual bell in response. Delaying for a substantial fraction of a second between the two characters (until I see the cursor move after typingEsc) does seem to correctly put me in vi normal ("command") mode.However, I am pretty sure that,
Esc,k, is not the start of a terminal function key sequence for any of the terminal definitions I've tried (and I am certain it's not forTERM=). Ought not Haskeline, when it reads anEscfollowed by a character that cannot be the second character of a valid terminal function key sequence, interpret this as individual characters typed by the user? Is there a way to make this happen?As a workaround, I'd personally be ok with being able to set the equivalent of readline's
set-keymap-timeoutto 0, but I cannot find such a configuration setting in the Wiki. And anyway that's still a poor solution since it would disable arrow keys etc. entirely and this would greatly annoy at least some people that I pair-program with.There may be further discussion of this in this forum post as well.