From 0604389a02a2cb5f33f5f84e460ad3d7a55f1fc4 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 29 Mar 2016 15:38:45 +1100 Subject: Feature [feature-requests:#1142]. Allow Super modifier on GTK+. --- src/Editor.cxx | 5 +++-- src/Editor.h | 2 +- src/KeyMap.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index b480287c3..eddc0e623 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2265,12 +2265,13 @@ void Editor::DelCharBack(bool allowLineStartDeletion) { ShowCaretAtCurrentPosition(); } -int Editor::ModifierFlags(bool shift, bool ctrl, bool alt, bool meta) { +int Editor::ModifierFlags(bool shift, bool ctrl, bool alt, bool meta, bool super) { return (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0) | - (meta ? SCI_META : 0); + (meta ? SCI_META : 0) | + (super ? SCI_SUPER : 0); } void Editor::NotifyFocus(bool focus) { diff --git a/src/Editor.h b/src/Editor.h index 67aad42d7..9cc648e84 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -414,7 +414,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void DelCharBack(bool allowLineStartDeletion); virtual void ClaimSelection() = 0; - static int ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false); + static int ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false, bool super=false); virtual void NotifyChange() = 0; virtual void NotifyFocus(bool focus); virtual void SetCtrlID(int identifier); diff --git a/src/KeyMap.h b/src/KeyMap.h index b102b356f..7c4f80720 100644 --- a/src/KeyMap.h +++ b/src/KeyMap.h @@ -17,6 +17,7 @@ namespace Scintilla { #define SCI_CTRL SCMOD_CTRL #define SCI_ALT SCMOD_ALT #define SCI_META SCMOD_META +#define SCI_SUPER SCMOD_SUPER #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) -- cgit v1.2.3