Open GoogleCodeExporter opened 8 years ago
In wininput.c: if ESC is pressed AND term.app_escape_key is enabled then the
ss3('[') code is sent (\e0[).
when VK_ESCAPE:
term.app_escape_key
? ss3('[')
: ctrl_ch(term.escape_sends_fs ? CTRL('\\') : CTRL('['));
Andy could you please show me where to hack this term.app_escape_key ternary
condition if CTRL + [ is pressed? Any concerns with doing this?
Original comment by saama...@gmail.com
on 12 Sep 2013 at 4:28
Got it working!
--- wininput.c (revision 1321)
+++ wininput.c (working copy)
@@ -599,6 +599,12 @@
bool ctrl_key(void) {
bool try_key(void) {
wchar wc = undead_keycode();
+
+ if (wc == '[' && term.app_escape_key) {
+ ss3('[');
+ return true;
+ }
+
char c;
switch (wc) {
when '@' or '[' ... '_' or 'a' ... 'z': c = CTRL(wc);
Let me know if this is the right place to hack it, and if you possibly plan on
integrating this?
For the most part this works great, but intermittently an escape to normal mode
by Ctrl-[ quickly switches to normal mode and then instantly back into insert
mode with a '[' character. However, this intermittent issue is also
reproducible on released stable mintty using the ESC key--maybe it's one of my
VIM plugins but anyway I found the fix for this. Just unset the timeout option
in vim (set notimeout). With vim 'notimeout' option set I haven't run into any
other issues.
For those interested, take a look at my vim config:
https://github.com/saamalik/dotvim/blob/master/init/mintty.vim
https://github.com/saamalik/dotvim/blob/master/init/options.vim
https://code.google.com/p/mintty/wiki/Tips#Avoiding_escape_timeout_issues_in_vim
Original comment by saama...@gmail.com
on 13 Sep 2013 at 4:48
Added some more instructions:
https://plus.google.com/110860299900460184325/posts/bJWrtA7Kh9C
Original comment by saama...@gmail.com
on 13 Sep 2013 at 7:13
Answered on https://github.com/mintty/mintty/issues/405
Original comment by towom...@googlemail.com
on 19 Jun 2015 at 11:15
Original issue reported on code.google.com by
saama...@gmail.com
on 12 Sep 2013 at 6:36