*SOLVED - code suggestion / bug fix in linux terminal/weechat
From
Brandon Holland@21:1/5 to
All on Wed Aug 18 20:08:14 2021
Can someone tell me what I broke here or if there's a better way to fix this? This solves a key bind issue I was having with moving to previous/next word in linux/weechat on PuTTY.
This is specific to putty at least it works with ssh.exe
(ssh to linux box from windows)
I made the changes to terminal.c past line 7194.
I wasn't sure what the app_flg or /x1BO did and didn't want over complicate anything before having a better idea.
Can something to this affect be added in the mainline?
/* Useful mapping of Ctrl-arrows */
/*
if (ctrl)
app_flg = !app_flg;
if (app_flg)
p += sprintf(p, "\x1BO%c", xkey);
else
p += sprintf(p, "\x1B[%c", xkey);
*/
if (ctrl && xkey == 67)
p += sprintf(p, "\x1B[1;5C");
else if (ctrl && xkey == 68)
p += sprintf(p, "\x1B[1;5D");
else
p += sprintf(p, "\x1B[%c", xkey);
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)