Only lowercase key bindings.

This commit is contained in:
Nicholas Marriott 2008-06-25 19:18:20 +00:00
parent 26792fc3a8
commit eb5638f3e7
2 changed files with 16 additions and 23 deletions

View File

@ -1,5 +1,6 @@
25 June 2008 25 June 2008
* Slim down default key bindings: support lowercase only.
* Handle escaped keys properly (parse eg \033b into a single key code) and * Handle escaped keys properly (parse eg \033b into a single key code) and
use this to change copy mode next/previous work to M-f and M-b to match use this to change copy mode next/previous work to M-f and M-b to match
emacs. emacs.
@ -566,4 +567,4 @@
(including mutt, emacs). No status bar yet and no key remapping or other (including mutt, emacs). No status bar yet and no key remapping or other
customisation. customisation.
$Id: CHANGES,v 1.141 2008-06-25 19:12:30 nicm Exp $ $Id: CHANGES,v 1.142 2008-06-25 19:18:20 nicm Exp $

View File

@ -1,4 +1,4 @@
/* $Id: key-bindings.c,v 1.35 2008-06-21 10:19:36 nicm Exp $ */ /* $Id: key-bindings.c,v 1.36 2008-06-25 19:18:20 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -76,22 +76,10 @@ key_bindings_init(void)
int key; int key;
const struct cmd_entry *entry; const struct cmd_entry *entry;
} table[] = { } table[] = {
{ 'D', &cmd_detach_client_entry }, { '#', &cmd_list_buffers_entry },
{ 'd', &cmd_detach_client_entry }, { '&', &cmd_kill_window_entry },
{ 'S', &cmd_list_sessions_entry }, { '-', &cmd_delete_buffer_entry },
{ 's', &cmd_list_sessions_entry },
{ 'W', &cmd_list_windows_entry },
{ 'w', &cmd_list_windows_entry },
{ '?', &cmd_list_keys_entry },
{ '/', &cmd_list_keys_entry }, { '/', &cmd_list_keys_entry },
{ 'C', &cmd_new_window_entry },
{ 'c', &cmd_new_window_entry },
{ 'N', &cmd_next_window_entry },
{ 'n', &cmd_next_window_entry },
{ 'P', &cmd_previous_window_entry },
{ 'p', &cmd_previous_window_entry },
{ 'L', &cmd_last_window_entry },
{ 'l', &cmd_last_window_entry },
{ '0', &cmd_select_window_entry }, { '0', &cmd_select_window_entry },
{ '1', &cmd_select_window_entry }, { '1', &cmd_select_window_entry },
{ '2', &cmd_select_window_entry }, { '2', &cmd_select_window_entry },
@ -102,15 +90,19 @@ key_bindings_init(void)
{ '7', &cmd_select_window_entry }, { '7', &cmd_select_window_entry },
{ '8', &cmd_select_window_entry }, { '8', &cmd_select_window_entry },
{ '9', &cmd_select_window_entry }, { '9', &cmd_select_window_entry },
{ 'R', &cmd_refresh_client_entry }, { ':', &cmd_command_prompt_entry },
{ 'r', &cmd_refresh_client_entry },
{ '&', &cmd_kill_window_entry },
{ '=', &cmd_scroll_mode_entry }, { '=', &cmd_scroll_mode_entry },
{ '?', &cmd_list_keys_entry },
{ '[', &cmd_copy_mode_entry }, { '[', &cmd_copy_mode_entry },
{ ']', &cmd_paste_buffer_entry }, { ']', &cmd_paste_buffer_entry },
{ '#', &cmd_list_buffers_entry }, { 'c', &cmd_new_window_entry },
{ '-', &cmd_delete_buffer_entry }, { 'd', &cmd_detach_client_entry },
{ ':', &cmd_command_prompt_entry }, { 'l', &cmd_last_window_entry },
{ 'n', &cmd_next_window_entry },
{ 'p', &cmd_previous_window_entry },
{ 'r', &cmd_refresh_client_entry },
{ 's', &cmd_list_sessions_entry },
{ 'w', &cmd_list_windows_entry },
{ META, &cmd_send_prefix_entry }, { META, &cmd_send_prefix_entry },
}; };
u_int i; u_int i;