diff options
author | nyamatongwe <unknown> | 2000-11-08 11:01:31 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-11-08 11:01:31 +0000 |
commit | c9bb15baa6165f8d7bd06c0eb372c5bed8d5a7e5 (patch) | |
tree | d58bbb6464ff6289407fb2cccca039f65b36b31e /src/Editor.cxx | |
parent | 65ed219ff652f65f5ee0c452e77907208171a6dc (diff) | |
download | scintilla-mirror-c9bb15baa6165f8d7bd06c0eb372c5bed8d5a7e5.tar.gz |
Changed keystroke handling so that GTK+ stops keys that are mapped to
commands which allows them to propogate up to containers rather than
requiring explicit propogation.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index dd4551735..3761154f3 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2296,14 +2296,19 @@ int Editor::KeyDefault(int, int) { return 0; } -int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt) { +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); int msg = kmap.Find(key, modifiers); - if (msg) + if (msg) { + if (consumed) + *consumed = true; return WndProc(msg, 0, 0); - else + } else { + if (consumed) + *consumed = false; return KeyDefault(key, modifiers); + } } void Editor::SetWhitespaceVisible(int view) { |