Changeset cb9313e in mainline for uspace/srv/hid/input/input.c
- Timestamp:
- 2019-05-12T15:02:29Z (5 years ago)
- Children:
- 3e1bc35
- Parents:
- 1e8b633
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2019-05-12 05:41:53)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-05-12 15:02:29)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/input.c
r1e8b633 rcb9313e 66 66 #include "serial.h" 67 67 68 #define NUM_LAYOUTS 469 70 static layout_ops_t *layout[NUM_LAYOUTS] = {71 &us_qwerty_ops,72 &us_dvorak_ops,73 &cz_ops,74 &ar_ops75 };76 77 68 typedef struct { 78 69 /** Link into the list of clients */ … … 206 197 } 207 198 208 // TODO: More elegant layout switching 209 210 if ((type == KEY_PRESS) && (kdev->mods & KM_LCTRL) && 211 (key == KC_F1)) { 199 if ((type == KEY_PRESS) && (kdev->mods & KM_LCTRL) && (key == KC_F1)) { 212 200 layout_destroy(kdev->active_layout); 213 kdev->active_layout = layout_create(layout[0]); 214 return; 215 } 216 217 if ((type == KEY_PRESS) && (kdev->mods & KM_LCTRL) && 218 (key == KC_F2)) { 219 layout_destroy(kdev->active_layout); 220 kdev->active_layout = layout_create(layout[1]); 221 return; 222 } 223 224 if ((type == KEY_PRESS) && (kdev->mods & KM_LCTRL) && 225 (key == KC_F3)) { 226 layout_destroy(kdev->active_layout); 227 kdev->active_layout = layout_create(layout[2]); 228 return; 229 } 230 231 if ((type == KEY_PRESS) && (kdev->mods & KM_LCTRL) && 232 (key == KC_F4)) { 233 layout_destroy(kdev->active_layout); 234 kdev->active_layout = layout_create(layout[3]); 201 kdev->active_layout = layout_create(&layout_default); 235 202 return; 236 203 } … … 392 359 kdev->mods = KM_NUM_LOCK; 393 360 kdev->lock_keys = 0; 394 kdev->active_layout = layout_create( layout[0]);361 kdev->active_layout = layout_create(&layout_default); 395 362 396 363 return kdev;
Note:
See TracChangeset
for help on using the changeset viewer.