diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-03 18:38:17 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-03 18:38:17 -0800 |
commit | 138282549e5cc98b2bb69177dfd16b99eafba085 (patch) | |
tree | 8a2afba3894b7a6235115761128802a26e2668c7 | |
parent | d3a12fb7f13118334c9be628c45599a6ef31d5dc (diff) | |
download | teliva-138282549e5cc98b2bb69177dfd16b99eafba085.tar.gz |
experimenting with different keys
On a Thinkpad X13, the `delete` key emits `^[[3~` outside of Teliva. Within Teliva, ncurses converts it to character code 330 (0x14a), which it fails to recognize as KEY_BACKSPACE. Why? My backspace is converted to character code 263, which ncurses does recognize as KEY_BACKSPACE. ctrl-h is character code 8. Both 330 and 263 are valid Unicode code points, which feels really ugly and ambiguous.
-rw-r--r-- | src/kilo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kilo.c b/src/kilo.c index 72fc23b..24ba9fd 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -1066,6 +1066,8 @@ static int Back_to_big_picture = 0; extern void save_editor_state(int rowoff, int coloff, int cy, int cx); static void editorProcessKeypress(lua_State* L) { int c = getch(); +//? mvprintw(LINES-3, 60, "key: %d\n", c); +//? getch(); switch(c) { case ENTER: { |