Added Ctrl-Z common key binding
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404255
This commit is contained in:
parent
b5fc901837
commit
3c1211c031
2 changed files with 15 additions and 0 deletions
|
@ -1031,6 +1031,8 @@ PrintEvent(SDL_Event * event)
|
||||||
void
|
void
|
||||||
CommonEvent(CommonState * state, SDL_Event * event, int *done)
|
CommonEvent(CommonState * state, SDL_Event * event, int *done)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (state->verbose & VERBOSE_EVENT) {
|
if (state->verbose & VERBOSE_EVENT) {
|
||||||
PrintEvent(event);
|
PrintEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -1051,6 +1053,15 @@ CommonEvent(CommonState * state, SDL_Event * event, int *done)
|
||||||
/* Ctrl-G toggle grab */
|
/* Ctrl-G toggle grab */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SDLK_z:
|
||||||
|
if (event->key.keysym.mod & KMOD_CTRL) {
|
||||||
|
/* Ctrl-Z minimize */
|
||||||
|
/* FIXME: Which window has focus for this keyboard? */
|
||||||
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
|
SDL_MinimizeWindow(state->windows[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SDLK_ESCAPE:
|
case SDLK_ESCAPE:
|
||||||
*done = 1;
|
*done = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -1078,3 +1089,5 @@ CommonQuit(CommonState * state)
|
||||||
}
|
}
|
||||||
SDL_free(state);
|
SDL_free(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -70,3 +70,5 @@ extern const char *CommonUsage(CommonState * state);
|
||||||
extern SDL_bool CommonInit(CommonState * state);
|
extern SDL_bool CommonInit(CommonState * state);
|
||||||
extern void CommonEvent(CommonState * state, SDL_Event * event, int *done);
|
extern void CommonEvent(CommonState * state, SDL_Event * event, int *done);
|
||||||
extern void CommonQuit(CommonState * state);
|
extern void CommonQuit(CommonState * state);
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue