/* xed - Simple hex editor Copyright (C) 2005 Ian Cowburn (ianc@noddybox.demon.co.uk) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------- Include file detailing the keys in xed $Id$ */ #ifndef XEDKEYS_H #define XEDKEYS_H /* To define control codes */ #define CNTL(x) ((x)-'@') /* Keys valid in HEX mode */ #define CURS_UP1 KEY_UP #define CURS_UP2 'k' #define CURS_DOWN1 KEY_DOWN #define CURS_DOWN2 'j' #define CURS_LEFT1 KEY_LEFT #define CURS_LEFT2 'h' #define CURS_RIGHT1 KEY_RIGHT #define CURS_RIGHT2 'l' #define PAGE_FWD1 '>' #define PAGE_FWD2 '.' #define PAGE_FWD3 CNTL('F') #define PAGE_BACK1 '<' #define PAGE_BACK2 ',' #define PAGE_BACK3 CNTL('B') #define SWITCH_TO_ASCII '\t' #define START_OF_FILE '^' #define END_OF_FILE '$' #define JUMP_TO '+' #define SAVE 's' #define RESTORE_BYTE 'R' #define REFRESH CNTL('R') #define INSERT_TOGGLE CNTL('A') #define DELETE_CHAR 'x' #define FIND_STRING '/' #define FIND_NEXT 'n' #define FIND_TYPE CNTL('T') #define FIND_CASE CNTL('K') /* Keys valid in ASCII mode */ #define ASC_CURS_UP1 KEY_UP #define ASC_CURS_UP2 CNTL('K') #define ASC_CURS_DOWN1 KEY_DOWN #define ASC_CURS_DOWN2 CNTL('J') #define ASC_CURS_LEFT1 KEY_LEFT #define ASC_CURS_LEFT2 CNTL('H') #define ASC_CURS_RIGHT1 KEY_RIGHT #define ASC_CURS_RIGHT2 CNTL('L') #define ASC_PAGE_FWD CNTL('F') #define ASC_PAGE_BACK CNTL('B') #define ASC_REFRESH (REFRESH) #define SWITCH_TO_HEX (SWITCH_TO_ASCII) #define ASC_DELETE_CHAR CNTL('X') #endif