21#include "../../SDL_internal.h"
23#if SDL_VIDEO_DRIVER_WINRT
35#include "../../events/scancodes_windows.h"
36#include "../../events/SDL_keyboard_c.h"
219WINRT_TranslateUnofficialKeycode(
int keycode)
255WINRT_TranslateKeycode(
int keycode,
unsigned int nativeScancode)
298 scancode = WinRT_Official_Keycodes[keycode];
301 scancode = WINRT_TranslateUnofficialKeycode(keycode);
317WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^args)
319 SDL_Scancode sdlScancode = WINRT_TranslateKeycode((
int)args->VirtualKey, args->KeyStatus.ScanCode);
322 SDL_Log(
"key down, handled=%s, ext?=%s, released?=%s, menu key down?=%s, "
323 "repeat count=%d, native scan code=0x%x, was down?=%s, vkey=%d, "
324 "sdl scan code=%d (%s), sdl key code=%d (%s)\n",
325 (args->Handled ?
"1" :
"0"),
326 (args->KeyStatus.IsExtendedKey ?
"1" :
"0"),
327 (args->KeyStatus.IsKeyReleased ?
"1" :
"0"),
328 (args->KeyStatus.IsMenuKeyDown ?
"1" :
"0"),
329 args->KeyStatus.RepeatCount,
330 args->KeyStatus.ScanCode,
331 (args->KeyStatus.WasKeyDown ?
"1" :
"0"),
343WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^args)
345 SDL_Scancode sdlScancode = WINRT_TranslateKeycode((
int)args->VirtualKey, args->KeyStatus.ScanCode);
348 SDL_Log(
"key up, handled=%s, ext?=%s, released?=%s, menu key down?=%s, "
349 "repeat count=%d, native scan code=0x%x, was down?=%s, vkey=%d, "
350 "sdl scan code=%d (%s), sdl key code=%d (%s)\n",
351 (args->Handled ?
"1" :
"0"),
352 (args->KeyStatus.IsExtendedKey ?
"1" :
"0"),
353 (args->KeyStatus.IsKeyReleased ?
"1" :
"0"),
354 (args->KeyStatus.IsMenuKeyDown ?
"1" :
"0"),
355 args->KeyStatus.RepeatCount,
356 args->KeyStatus.ScanCode,
357 (args->KeyStatus.WasKeyDown ?
"1" :
"0"),
369WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArgs ^args)
376 src_ucs2[0] = args->KeyCode;
380 result = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)&src_ucs2, -1, (LPSTR)dest_utf8,
sizeof(dest_utf8),
NULL,
NULL);
387#if NTDDI_VERSION >= NTDDI_WIN10
396 using namespace Windows::UI::ViewManagement;
397 InputPane ^ inputPane = InputPane::GetForCurrentView();
399 inputPane->TryShow();
405 using namespace Windows::UI::ViewManagement;
406 InputPane ^ inputPane = InputPane::GetForCurrentView();
408 inputPane->TryHide();
414 using namespace Windows::UI::ViewManagement;
415 InputPane ^ inputPane = InputPane::GetForCurrentView();
420 Windows::Foundation::Rect
rect = inputPane->OccludedRect;
421 if (
rect.Width > 0 &&
rect.Height > 0) {
#define SDL_GetScancodeName
#define SDL_GetKeyFromScancode
int SDL_SendKeyboardText(const char *text)
int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
Sint32 SDL_Keycode
The SDL virtual key representation.
SDL_Scancode
The SDL keyboard scancode representation.
@ SDL_SCANCODE_RIGHTBRACKET
@ SDL_SCANCODE_CALCULATOR
@ SDL_SCANCODE_APOSTROPHE
@ SDL_SCANCODE_AC_REFRESH
@ SDL_SCANCODE_NUMLOCKCLEAR
@ SDL_SCANCODE_SCROLLLOCK
@ SDL_SCANCODE_LEFTBRACKET
@ SDL_SCANCODE_AC_BOOKMARKS
@ SDL_SCANCODE_KP_MULTIPLY
@ SDL_SCANCODE_APPLICATION
@ SDL_SCANCODE_VOLUMEDOWN
@ SDL_SCANCODE_MEDIASELECT
@ SDL_SCANCODE_AC_FORWARD
#define SDL_arraysize(array)
EGLSurface EGLNativeWindowType * window
static const SDL_Scancode windows_scancode_table[]
The type used to identify a window.