toxic icon indicating copy to clipboard operation
toxic copied to clipboard

ctrl+h does't work when changing the key bindings

Open oren opened this issue 9 years ago • 6 comments

I tried to modify next_tab to ctrl+h and it's not working. (I set page_bottom to ctrl+d instead of ctrl+h)

keys = {
    next_tab="Ctrl+H";
    prev_tab="Ctrl+T";
    scroll_line_up="PAGEUP";
    scroll_line_down="PAGEDOWN";
    half_page_up="Ctrl+F";
    half_page_down="Ctrl+V";
    page_bottom="Ctrl+D";
    peer_list_up="Ctrl+[";
    peer_list_down="Ctrl+]";
};

oren avatar Aug 03 '14 02:08 oren

Also doesn't work for me without changing key bindings

zetok avatar Aug 14 '14 21:08 zetok

Assuming you're still having this issue, what terminal/shell are you using? It might be terminfo related.

ghost avatar Sep 23 '14 15:09 ghost

Issue still haven't been fixed, unless there was commit in last 2 days that did fix it. I use konsole; TERM=xterm

zetok avatar Sep 23 '14 15:09 zetok

I can reproduce it using st and zsh. The problem might be in the same realm as this:

https://www.reddit.com/r/vim/comments/2gku6i/cant_seem_to_map_c_cwcl/

ghost avatar Sep 23 '14 16:09 ghost

I use bash

zetok avatar Sep 23 '14 16:09 zetok

According to xxd, ^H isn't registered for st in a tmux session, so maybe tmux is eating that specific character sequence. However ^H is registered by xxd in just plain st, but it still doesn't work in toxic. Perhaps it's something wrong with toxic's implementation, but I'm not sure.

Maybe the wrong ASCII char code is being used, because the following doesn't even work (I assume it defaults to this if there's no config, but I really have no idea).

diff --git a/src/toxic.h b/src/toxic.h
index 093aee0..74cc3aa 100644
--- a/src/toxic.h
+++ b/src/toxic.h
@@ -53,14 +53,14 @@
 #define T_KEY_KILL       0x0B     /* ctrl-k */
 #define T_KEY_DISCARD    0x15     /* ctrl-u */
 #define T_KEY_NEXT       0x10     /* ctrl-p */
-#define T_KEY_PREV       0x0F     /* ctrl-o */
+#define T_KEY_PREV       0x08     /* ctrl-h */
 #define T_KEY_C_E        0x05     /* ctrl-e */
 #define T_KEY_C_A        0x01     /* ctrl-a */
 #define T_KEY_C_RB       0x1D     /* ctrl-] */
 #define T_KEY_C_LB       0x1B     /* ctrl-[ */
 #define T_KEY_C_V        0x16     /* ctrl-v */
 #define T_KEY_C_F        0x06     /* ctrl-f */
-#define T_KEY_C_H        0x08     /* ctrl-h */
+#define T_KEY_C_H        0x0F     /* ctrl-o */
 #define T_KEY_C_Y        0x19     /* ctrl-y */
 #define T_KEY_TAB        0x09     /* TAB key */

ghost avatar Sep 23 '14 16:09 ghost

Closing due to inactivity

JFreegman avatar Jan 25 '24 18:01 JFreegman