summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-input.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-04-30 19:21:28 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-04-30 19:21:28 +0000
commitdca4064502ebdc9d2d9fbdaa31c1b4a717ca96ae (patch)
tree291ef0faf55c5090066a3e85f552e2e1c87b754b /src/gui/curses/gui-input.c
parent8a3d30b03a37c037889b4e65a8943ba496be08f8 (diff)
downloadweechat-dca4064502ebdc9d2d9fbdaa31c1b4a717ca96ae.zip
Added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
Diffstat (limited to 'src/gui/curses/gui-input.c')
-rw-r--r--src/gui/curses/gui-input.c51
1 files changed, 34 insertions, 17 deletions
diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c
index 7d92ae8e7..245e0dd10 100644
--- a/src/gui/curses/gui-input.c
+++ b/src/gui/curses/gui-input.c
@@ -72,8 +72,6 @@ gui_read_keyb ()
case KEY_F(3):
case KEY_F(4):
case KEY_F(9):
- case KEY_F(11):
- case KEY_F(12):
break;
/* previous buffer in window */
case KEY_F(5):
@@ -96,6 +94,12 @@ gui_read_keyb ()
gui_infobar_remove ();
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
break;
+ case KEY_F(11):
+ gui_nick_move_page_up (gui_current_window);
+ break;
+ case KEY_F(12):
+ gui_nick_move_page_down (gui_current_window);
+ break;
/* cursor up */
case KEY_UP:
if (gui_current_window->buffer->dcc)
@@ -416,25 +420,38 @@ gui_read_keyb ()
case KEY_RIGHT:
gui_switch_to_next_buffer (gui_current_window);
break;
+ /* Alt + home */
+ case KEY_HOME:
+ gui_nick_move_beginning (gui_current_window);
+ break;
+ /* Alt + end */
+ case KEY_END:
+ gui_nick_move_end (gui_current_window);
+ break;
+ /* Alt + page up */
+ case KEY_PPAGE:
+ gui_nick_move_page_up (gui_current_window);
+ break;
+ /* Alt + page down */
+ case KEY_NPAGE:
+ gui_nick_move_page_down (gui_current_window);
+ break;
case 79:
/* TODO: replace 79 by constant name! */
- if (key == 79)
+ if ((key = getch()) != ERR)
{
- if ((key = getch()) != ERR)
+ switch (key)
{
- switch (key)
- {
- /* Control + Right */
- case 99:
- if (!gui_current_window->buffer->dcc)
- gui_move_next_word (gui_current_window->buffer);
- break;
- /* Control + Left */
- case 100:
- if (!gui_current_window->buffer->dcc)
- gui_move_previous_word (gui_current_window->buffer);
- break;
- }
+ /* Control + Right */
+ case 99:
+ if (!gui_current_window->buffer->dcc)
+ gui_move_next_word (gui_current_window->buffer);
+ break;
+ /* Control + Left */
+ case 100:
+ if (!gui_current_window->buffer->dcc)
+ gui_move_previous_word (gui_current_window->buffer);
+ break;
}
}
break;