From e11e72222237c9b95cd2242aec88421a3dee3452 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Jun 2011 23:07:00 +1000 Subject: Added SCMOD_META key modifier for the Control key on OS X. New version of KeyDown, KeyDownWithModifiers uses a mask of modifiers. --- doc/ScintillaDoc.html | 5 ++++- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/Editor.cxx | 10 +++++++--- src/Editor.h | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 1e541bbb8..5ba329876 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -4446,7 +4446,10 @@ struct Sci_TextToFind { SCK_WIN.

The modifiers are a combination of zero or more of SCMOD_ALT, - SCMOD_CTRL, and SCMOD_SHIFT. If you are building a table, you might + SCMOD_CTRL, SCMOD_SHIFT, and SCMOD_META. + On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to + SCMOD_META. + If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers.

SCI_ASSIGNCMDKEY(int (view); } diff --git a/src/Editor.h b/src/Editor.h index eccdb717f..74f0eff86 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -465,6 +465,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int StartEndDisplayLine(int pos, bool start); virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); + int KeyDownWithModifiers(int key, int modifiers, bool *consumed); int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0); int GetWhitespaceVisible(); -- cgit v1.2.3