Keywan Ghadami 2016-01-30 14:56:55 +01:00
parent 22f12f7183
commit 32d59ecaae
1 changed files with 5 additions and 2 deletions

View File

@ -777,8 +777,11 @@ class SDLWindow : Window {
string str = fromStringz(s).dup; string str = fromStringz(s).dup;
dstring ds = toUTF32(str); dstring ds = toUTF32(str);
uint flags = convertKeyFlags(SDL_GetModState()); uint flags = convertKeyFlags(SDL_GetModState());
if (flags & KeyFlag.Control || flags & KeyFlag.Alt || flags & KeyFlag.Menu) //do not handle Ctrl+Space as text https://github.com/buggins/dlangui/issues/160
return true; //but do hanlde RAlt https://github.com/buggins/dlangide/issues/129
if (flags & KeyFlag.Control || (flags & KeyFlag.LAlt) == KeyFlag.LAlt || flags & KeyFlag.Menu)
return true;
bool res = dispatchKeyEvent(new KeyEvent(KeyAction.Text, 0, flags, ds)); bool res = dispatchKeyEvent(new KeyEvent(KeyAction.Text, 0, flags, ds));
if (res) { if (res) {
debug(DebugSDL) Log.d("Calling update() after text event"); debug(DebugSDL) Log.d("Calling update() after text event");