Fixed X11 build, added code to print initial modifiers to checkkeys
This commit is contained in:
parent
6480b36e2e
commit
aafa101499
2 changed files with 91 additions and 73 deletions
|
@ -88,6 +88,20 @@ print_modifiers(char **text, size_t *maxlen)
|
|||
print_string(text, maxlen, " MODE");
|
||||
}
|
||||
|
||||
static void
|
||||
PrintModifierState()
|
||||
{
|
||||
char message[512];
|
||||
char *spot;
|
||||
size_t left;
|
||||
|
||||
spot = message;
|
||||
left = sizeof(message);
|
||||
|
||||
print_modifiers(&spot, &left);
|
||||
SDL_Log("Initial state:%s\n", message);
|
||||
}
|
||||
|
||||
static void
|
||||
PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
|
||||
{
|
||||
|
@ -200,6 +214,10 @@ main(int argc, char *argv[])
|
|||
|
||||
SDL_StartTextInput();
|
||||
|
||||
/* Print initial modifier state */
|
||||
SDL_PumpEvents();
|
||||
PrintModifierState();
|
||||
|
||||
/* Watch keystrokes */
|
||||
done = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue