diff options
author | Kacper Kasper <unknown> | 2018-08-29 08:08:42 +1000 |
---|---|---|
committer | Kacper Kasper <unknown> | 2018-08-29 08:08:42 +1000 |
commit | deb5b378250069b9da1348f74b46b19a80b66f3d (patch) | |
tree | 4c72b91f8e4c98f502684f87790fba01aad62100 | |
parent | d4c70817e36bb2fbe389ba580e1bbffdf038af5f (diff) | |
download | scintilla-mirror-deb5b378250069b9da1348f74b46b19a80b66f3d.tar.gz |
Backport: Allow read access to the key map.
Required on Haiku to set up key bindings that include the Cmd modifier.
Backport of changeset 7077:1593328120e5.
-rw-r--r-- | src/KeyMap.cxx | 4 | ||||
-rw-r--r-- | src/KeyMap.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/KeyMap.cxx b/src/KeyMap.cxx index 7587ef03f..42982b4f7 100644 --- a/src/KeyMap.cxx +++ b/src/KeyMap.cxx @@ -45,6 +45,10 @@ unsigned int KeyMap::Find(int key, int modifiers) const { return (it == kmap.end()) ? 0 : it->second; } +const std::map<KeyModifiers, unsigned int> &KeyMap::GetKeyMap() const { + return kmap; +} + #if PLAT_GTK_MACOSX #define OS_X_KEYS 1 #else diff --git a/src/KeyMap.h b/src/KeyMap.h index 08f6c4ef7..b4299feec 100644 --- a/src/KeyMap.h +++ b/src/KeyMap.h @@ -56,6 +56,7 @@ public: void Clear(); void AssignCmdKey(int key, int modifiers, unsigned int msg); unsigned int Find(int key, int modifiers) const; // 0 returned on failure + const std::map<KeyModifiers, unsigned int> &GetKeyMap() const; }; } |