aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKacper Kasper <unknown>2018-08-29 08:08:42 +1000
committerKacper Kasper <unknown>2018-08-29 08:08:42 +1000
commita52b980b2ddeda48f17b07adc898ac7a28a11c15 (patch)
treee4c1da9420bd7bf80f5d066a2de34deddbaf3305
parentdf064f0417852ef3432dd46c873b0b6d4e9cfc1c (diff)
downloadscintilla-mirror-a52b980b2ddeda48f17b07adc898ac7a28a11c15.tar.gz
Allow read access to the key map.
Required on Haiku to set up key bindings that include the Cmd modifier.
-rw-r--r--src/KeyMap.cxx4
-rw-r--r--src/KeyMap.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/KeyMap.cxx b/src/KeyMap.cxx
index 55f690f07..d7f87a5d9 100644
--- a/src/KeyMap.cxx
+++ b/src/KeyMap.cxx
@@ -46,6 +46,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;
};
}