shift+space should insert a space

This commit is contained in:
Josh Holtrop 2017-01-17 23:13:19 -05:00
parent 30290e86f5
commit 16d4b1e21b

View File

@ -384,7 +384,7 @@ uint32_t Window::get_keyval(SDL_Keycode keysym)
if ((m_keymod & (KMOD_SHIFT | KMOD_CAPS)) != 0u) if ((m_keymod & (KMOD_SHIFT | KMOD_CAPS)) != 0u)
{ {
uint32_t shifted = get_shifted(keyval); uint32_t shifted = get_shifted(keyval);
if (shifted != keyval) if (shifted != 0u)
{ {
keyval = shifted; keyval = shifted;
} }
@ -475,7 +475,8 @@ uint32_t Window::get_shifted(uint32_t keysym)
case SDLK_BACKSLASH: return '|'; case SDLK_BACKSLASH: return '|';
case SDLK_RIGHTBRACKET: return '}'; case SDLK_RIGHTBRACKET: return '}';
case SDLK_BACKQUOTE: return '~'; case SDLK_BACKQUOTE: return '~';
case SDLK_SPACE: return ' ';
} }
return keysym; return 0u;
} }