aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-15 23:07:00 +1000
committernyamatongwe <unknown>2011-06-15 23:07:00 +1000
commite11e72222237c9b95cd2242aec88421a3dee3452 (patch)
tree9587892f3fe3881aba224c4b840430a2e222ca5c /src/Editor.cxx
parent3239f7cbe4d9f86b5eb2429a9819d0ce002659d9 (diff)
downloadscintilla-mirror-e11e72222237c9b95cd2242aec88421a3dee3452.tar.gz
Added SCMOD_META key modifier for the Control key on OS X.
New version of KeyDown, KeyDownWithModifiers uses a mask of modifiers.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 587aa8050..648dd8034 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5516,10 +5516,8 @@ int Editor::KeyDefault(int, int) {
return 0;
}
-int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
+int Editor::KeyDownWithModifiers(int key, int modifiers, bool *consumed) {
DwellEnd(false);
- int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
- (alt ? SCI_ALT : 0);
int msg = kmap.Find(key, modifiers);
if (msg) {
if (consumed)
@@ -5532,6 +5530,12 @@ int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
}
}
+int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
+ int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+ (alt ? SCI_ALT : 0);
+ return KeyDownWithModifiers(key, modifiers, consumed);
+}
+
void Editor::SetWhitespaceVisible(int view) {
vs.viewWhitespace = static_cast<WhiteSpaceVisibility>(view);
}