diff options
| author | nyamatongwe <unknown> | 2000-03-08 01:43:56 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2000-03-08 01:43:56 +0000 | 
| commit | c196d2fc7c3ece7ccb7d89c425499a75ead7e59b (patch) | |
| tree | 3ea3c536f04e88499b86ed82e8a9a457f96b4978 /src/KeyMap.h | |
| parent | 7fbd8e2a34d2f5084ce26ad95d7c70ae4de6a233 (diff) | |
| download | scintilla-mirror-c196d2fc7c3ece7ccb7d89c425499a75ead7e59b.tar.gz | |
Initial revision
Diffstat (limited to 'src/KeyMap.h')
| -rw-r--r-- | src/KeyMap.h | 35 | 
1 files changed, 35 insertions, 0 deletions
| diff --git a/src/KeyMap.h b/src/KeyMap.h new file mode 100644 index 000000000..814f3aa3b --- /dev/null +++ b/src/KeyMap.h @@ -0,0 +1,35 @@ +// Scintilla source code edit control +// KeyMap.h - defines a mapping between keystrokes and commands +// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef KEYTOCOMMAND_H +#define KEYTOCOMMAND_H + +#define SCI_NORM 0 +#define SCI_SHIFT SHIFT_PRESSED +#define SCI_CTRL LEFT_CTRL_PRESSED +#define SCI_ALT LEFT_ALT_PRESSED +#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) + +class KeyToCommand { +public: +	int key; +	int modifiers; +	UINT msg; +}; + +class KeyMap { +	KeyToCommand *kmap; +	int len; +	int alloc; +	static KeyToCommand MapDefault[]; +public: +	KeyMap(); +	~KeyMap(); +	void Clear(); +	void AssignCmdKey(int key, int modifiers, UINT msg); +	UINT Find(int key, int modifiers);	// 0 returned on failure +}; + +#endif | 
