aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2006-08-22 00:06:29 +0000
committernyamatongwe <unknown>2006-08-22 00:06:29 +0000
commit3b2ada7a95cc1f0e990963980ee1e5d67c865e1e (patch)
tree54a6a696533a2b428c6858f893921c0de6e34ca8
parentd6ff99188499850e812633922ff240299dda65f1 (diff)
downloadscintilla-mirror-3b2ada7a95cc1f0e990963980ee1e5d67c865e1e.tar.gz
Basic recognition of the Windows and Context Menu keys as SCK_WIN and
SCK_MENU so that these keys don't commands associated with their values ('[' and ']'). SCK_WIN can be mapped on both platforms but if SCK_MENU is mapped on Windows it executes both the mapped command and shows the context menu. Called "Win" and "Menu" in SciTE but only "Win" documented.
-rw-r--r--gtk/ScintillaGTK.cxx4
-rw-r--r--include/Scintilla.h2
-rw-r--r--include/Scintilla.iface2
-rw-r--r--win32/ScintillaWin.cxx2
4 files changed, 10 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 689475196..9b7a0baae 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1945,6 +1945,10 @@ static int KeyTranslate(int keyIn) {
return SCK_SUBTRACT;
case GDK_KP_Divide:
return SCK_DIVIDE;
+ case GDK_Super_L:
+ return SCK_WIN;
+ case GDK_Menu:
+ return SCK_MENU;
default:
return keyIn;
}
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 426c8d4e6..77d1deb28 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -668,6 +668,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCK_ADD 310
#define SCK_SUBTRACT 311
#define SCK_DIVIDE 312
+#define SCK_WIN 313
+#define SCK_MENU 314
#define SCMOD_NORM 0
#define SCMOD_SHIFT 1
#define SCMOD_CTRL 2
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index c3e5b56fe..7010cc342 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1760,6 +1760,8 @@ val SCK_RETURN=13
val SCK_ADD=310
val SCK_SUBTRACT=311
val SCK_DIVIDE=312
+val SCK_WIN=313
+val SCK_MENU=314
enu KeyMod=SCMOD_
val SCMOD_NORM=0
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index d82d87ae8..b1ba0155b 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -396,6 +396,8 @@ static int KeyTranslate(int keyIn) {
case VK_ADD: return SCK_ADD;
case VK_SUBTRACT: return SCK_SUBTRACT;
case VK_DIVIDE: return SCK_DIVIDE;
+ case VK_LWIN: return SCK_WIN;
+ case VK_APPS: return SCK_MENU;
case VK_OEM_2: return '/';
case VK_OEM_3: return '`';
case VK_OEM_4: return '[';