1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
3 Copyright (C) 2002-2013 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #define CTRL(x) ((x) & 0x1f)
23 #define KEY_ESCAPE CTRL('[')
26 MODE_HISTORY
, MODE_PLAY
, MODE_EDIT
34 CURSOR_POSITION
, SP_POSITION
, SPS_POSITION
37 typedef void (key_func
)(void);
58 struct key_s
**history_keys
;
59 key_func do_history_jump_next
;
60 key_func do_history_jump_prev
;
61 key_func do_history_next
;
62 key_func do_history_prev
;
63 key_func do_history_half_move_toggle
;
64 key_func do_history_rotate_board
;
65 key_func do_history_jump
;
66 key_func do_history_find_new
;
67 key_func do_history_find_next
;
68 key_func do_history_find_prev
;
69 key_func do_history_annotate
;
70 key_func do_history_rav_next
;
71 key_func do_history_rav_prev
;
72 key_func do_history_menu
;
73 key_func do_history_toggle
;
74 key_func do_history_help
;
76 struct key_s
**edit_keys
;
77 key_func do_edit_select
;
78 key_func do_edit_commit
;
79 key_func do_edit_cancel_selected
;
80 key_func do_edit_delete
;
81 key_func do_edit_insert
;
82 key_func do_edit_toggle_castle
;
83 key_func do_edit_enpassant
;
84 key_func do_edit_switch_turn
;
85 key_func do_edit_help
;
86 key_func do_edit_exit
;
88 struct key_s
**play_keys
;
89 key_func do_play_select
;
90 key_func do_play_commit
;
91 key_func do_play_cancel_selected
;
92 key_func do_play_set_clock
;
93 //key_func do_play_switch_turn;
94 key_func do_play_undo
;
96 key_func do_play_send_command
;
97 key_func do_play_toggle_eh_mode
;
98 key_func do_play_toggle_engine
;
99 key_func do_play_toggle_human
;
100 key_func do_play_help
;
101 key_func do_play_toggle_pause
;
102 key_func do_play_history_mode
;
103 key_func do_play_edit_mode
;
105 struct key_s
**global_keys
;
106 key_func do_global_tag_edit
;
107 key_func do_global_tag_view
;
108 key_func do_global_find_new
;
109 key_func do_global_find_next
;
110 key_func do_global_find_prev
;
111 key_func do_global_new_game
;
112 key_func do_global_new_all
;
113 key_func do_global_copy_game
;
114 key_func do_global_next_game
;
115 key_func do_global_prev_game
;
116 key_func do_global_game_jump
;
117 key_func do_global_toggle_delete
;
118 key_func do_global_delete_game
;
119 key_func do_global_resume_game
;
120 key_func do_global_save_game
;
121 key_func do_global_about
;
122 key_func do_global_quit
;
123 key_func do_global_toggle_engine_window
;
124 key_func do_global_toggle_board_details
;
125 key_func do_global_toggle_strict_castling
;
127 key_func do_global_perl
;