summaryrefslogtreecommitdiff
path: root/xedkeys.h
blob: 6ecd1893afa6afa13676d088641db2978a00aae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
    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