Changeset 12b6796 in mainline
- Timestamp:
- 2009-02-20T22:47:08Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ad8661
- Parents:
- 90e3d6a
- Location:
- uspace/srv/kbd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/kbd/ctl/pc.c
r90e3d6a r12b6796 136 136 [0x58] = KC_F12, 137 137 138 [0x46] = KC_SCROLL_LOCK, 139 138 140 [0x1c] = KC_ENTER, 139 141 … … 160 162 161 163 [0x37] = KC_PRTSCR, 164 162 165 [0x52] = KC_INSERT, 166 [0x47] = KC_HOME, 163 167 [0x49] = KC_PAGE_UP, 164 168 -
uspace/srv/kbd/generic/kbd.c
r90e3d6a r12b6796 64 64 static unsigned mods = KM_NUM_LOCK; 65 65 66 /** Currently pressed lock keys. We track these to tackle autorepeat. */ 67 static unsigned lock_keys; 68 66 69 void kbd_push_scancode(int scancode) 67 70 { … … 99 102 } 100 103 101 if (mod_mask != 0 && type == KE_PRESS) 102 mods = mods ^ mod_mask; 104 if (mod_mask != 0) { 105 if (type == KE_PRESS) { 106 /* 107 * Only change lock state on transition from released 108 * to pressed. This prevents autorepeat from messing 109 * up the lock state. 110 */ 111 mods = mods ^ (mod_mask & ~lock_keys); 112 lock_keys = lock_keys | mod_mask; 113 } else { 114 lock_keys = lock_keys & ~mod_mask; 115 } 116 } 103 117 104 118 printf("type: %d\n", type);
Note:
See TracChangeset
for help on using the changeset viewer.