diff --git a/src/groupchat.c b/src/groupchat.c index 82d1367..d888714 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -147,9 +147,9 @@ static void print_groupchat_help(ToxWindow *self) for (i = 0; i < NUMLINES; ++i) line_info_add(self, NULL, NULL, NULL, lines[i], SYS_MSG, 0, 0); - msg = " * Use Page Up/Page Down to scroll chat history"; + msg = " * Use Page Up/Page Down keys to scroll chat history"; line_info_add(self, NULL, NULL, NULL, msg, SYS_MSG, 1, CYAN); - msg = " * Scroll peer list with the < and > keys.\n"; + msg = " * Scroll peer list with the ctrl-] and ctrl-[ keys.\n"; line_info_add(self, NULL, NULL, NULL, msg, SYS_MSG, 1, CYAN); msg = " * Notice, some friends will be missing names while finding peers\n"; line_info_add(self, NULL, NULL, NULL, msg, SYS_MSG, 1, 0); @@ -394,6 +394,7 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr) } } else { /* if (!ltr) */ + if (line_info_onKey(self, key)) return; @@ -512,14 +513,14 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr) } /* Scroll peerlist up and down one position if list overflows window */ - else if (key == T_KEY_C_PRD) { + else if (key == T_KEY_C_LB) { int L = y2 - CHATBOX_HEIGHT - SDBAR_OFST; if (groupchats[self->num].side_pos < groupchats[self->num].num_peers - L) ++groupchats[self->num].side_pos; } - else if (key == T_KEY_C_CMA) { + else if (key == T_KEY_C_RB) { if (groupchats[self->num].side_pos > 0) --groupchats[self->num].side_pos; } diff --git a/src/toxic b/src/toxic new file mode 100644 index 0000000..90b2bc0 Binary files /dev/null and b/src/toxic differ diff --git a/src/toxic.h b/src/toxic.h index 5ed9c07..166998d 100644 --- a/src/toxic.h +++ b/src/toxic.h @@ -52,8 +52,8 @@ #define T_KEY_C_E 0x05 /* ctrl-e */ #define T_KEY_C_A 0x01 /* ctrl-a */ #define T_KEY_ESC 0x1B /* ESC key */ -#define T_KEY_C_CMA 0x2C /* ctrl-comma */ -#define T_KEY_C_PRD 0x2E /* ctrl-period */ +#define T_KEY_C_RB 0x1D /* ctrl-] */ +#define T_KEY_C_LB 0x1B /* ctrl-[ */ enum { MOVE_UP,