Set the working directory on Windows very early to also help code which uses relative...
[geany-mirror.git] / scintilla / src / KeyMap.h
blobf1235d845799826c1eb07336c6639937883a067c
1 // Scintilla source code edit control
2 /** @file KeyMap.h
3 ** Defines a mapping between keystrokes and commands.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef KEYTOCOMMAND_H
9 #define KEYTOCOMMAND_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 #define SCI_NORM 0
16 #define SCI_SHIFT SCMOD_SHIFT
17 #define SCI_CTRL SCMOD_CTRL
18 #define SCI_ALT SCMOD_ALT
19 #define SCI_META SCMOD_META
20 #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
21 #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
23 /**
25 class KeyToCommand {
26 public:
27 int key;
28 int modifiers;
29 unsigned int msg;
32 /**
34 class KeyMap {
35 KeyToCommand *kmap;
36 int len;
37 int alloc;
38 static const KeyToCommand MapDefault[];
40 public:
41 KeyMap();
42 ~KeyMap();
43 void Clear();
44 void AssignCmdKey(int key, int modifiers, unsigned int msg);
45 unsigned int Find(int key, int modifiers); // 0 returned on failure
48 #ifdef SCI_NAMESPACE
50 #endif
52 #endif