Changeset f9ae472 in mainline for uspace/app/gfxdemo/gfxdemo.c
- Timestamp:
- 2023-10-10T17:44:52Z (15 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 082feff
- Parents:
- af967ef9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/gfxdemo/gfxdemo.c
raf967ef9 rf9ae472 1205 1205 } 1206 1206 1207 static void demo_kbd_event(kbd_event_t *event) 1208 { 1209 if (event->type == KEY_PRESS) { 1210 /* Ctrl-Q */ 1211 if ((event->mods & KM_CTRL) != 0 && 1212 (event->mods & KM_ALT) == 0 && 1213 (event->mods & KM_SHIFT) == 0 && 1214 event->key == KC_Q) { 1215 demo_quit(); 1216 } 1217 1218 /* Escape */ 1219 if ((event->mods & KM_CTRL) == 0 && 1220 (event->mods & KM_ALT) == 0 && 1221 (event->mods & KM_SHIFT) == 0 && 1222 event->key == KC_ESCAPE) { 1223 demo_quit(); 1224 } 1225 } 1226 } 1227 1207 1228 static void wnd_kbd_event(void *arg, kbd_event_t *event) 1208 1229 { 1209 if (event->type == KEY_PRESS)1210 demo_quit();1230 (void)arg; 1231 demo_kbd_event(event); 1211 1232 } 1212 1233 … … 1218 1239 static void uiwnd_kbd_event(ui_window_t *window, void *arg, kbd_event_t *event) 1219 1240 { 1220 if (event->type == KEY_PRESS) 1221 demo_quit(); 1241 (void)window; 1242 (void)arg; 1243 demo_kbd_event(event); 1222 1244 } 1223 1245
Note:
See TracChangeset
for help on using the changeset viewer.