aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/KeyMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/KeyMap.h')
-rw-r--r--src/KeyMap.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/KeyMap.h b/src/KeyMap.h
index 2f14e2488..b102b356f 100644
--- a/src/KeyMap.h
+++ b/src/KeyMap.h
@@ -22,6 +22,22 @@ namespace Scintilla {
/**
*/
+class KeyModifiers {
+public:
+ int key;
+ int modifiers;
+ KeyModifiers(int key_, int modifiers_) : key(key_), modifiers(modifiers_) {
+ }
+ bool operator<(const KeyModifiers &other) const {
+ if (key == other.key)
+ return modifiers < other.modifiers;
+ else
+ return key < other.key;
+ }
+};
+
+/**
+ */
class KeyToCommand {
public:
int key;
@@ -32,7 +48,7 @@ public:
/**
*/
class KeyMap {
- std::vector<KeyToCommand> kmap;
+ std::map<KeyModifiers, unsigned int> kmap;
static const KeyToCommand MapDefault[];
public: