Lines Matching refs:ahid
287 struct adbhid *ahid = adbhid[id]; in adbhid_input_keycode() local
297 if (ahid->flags & FLAG_CAPSLOCK_IGNORE_NEXT) { in adbhid_input_keycode()
300 ahid->flags &= ~FLAG_CAPSLOCK_IGNORE_NEXT; in adbhid_input_keycode()
303 ahid->flags |= FLAG_CAPSLOCK_TRANSLATE in adbhid_input_keycode()
307 !(ahid->flags & FLAG_POWER_KEY_PRESSED)) { in adbhid_input_keycode()
311 if (ahid->flags & FLAG_CAPSLOCK_TRANSLATE) { in adbhid_input_keycode()
313 if (ahid->flags & FLAG_CAPSLOCK_DOWN) { in adbhid_input_keycode()
316 ahid->flags &= ~FLAG_CAPSLOCK_DOWN; in adbhid_input_keycode()
320 ahid->flags &= ~FLAG_CAPSLOCK_TRANSLATE; in adbhid_input_keycode()
333 input_report_key(ahid->input, KEY_CAPSLOCK, 1); in adbhid_input_keycode()
334 input_sync(ahid->input); in adbhid_input_keycode()
335 input_report_key(ahid->input, KEY_CAPSLOCK, 0); in adbhid_input_keycode()
336 input_sync(ahid->input); in adbhid_input_keycode()
353 ahid->flags &= ~FLAG_POWER_KEY_PRESSED; in adbhid_input_keycode()
355 ahid->flags |= FLAG_POWER_KEY_PRESSED; in adbhid_input_keycode()
358 if (ahid->flags & FLAG_FN_KEY_PRESSED) { in adbhid_input_keycode()
361 ahid->flags &= ~FLAG_POWER_FROM_FN; in adbhid_input_keycode()
363 ahid->flags |= FLAG_POWER_FROM_FN; in adbhid_input_keycode()
364 } else if (ahid->flags & FLAG_POWER_FROM_FN) { in adbhid_input_keycode()
366 ahid->flags &= ~FLAG_POWER_FROM_FN; in adbhid_input_keycode()
372 ahid->flags &= ~FLAG_FN_KEY_PRESSED; in adbhid_input_keycode()
374 if (ahid->flags & FLAG_EMU_FWDEL_DOWN) { in adbhid_input_keycode()
375 ahid->flags &= ~FLAG_EMU_FWDEL_DOWN; in adbhid_input_keycode()
380 ahid->flags |= FLAG_FN_KEY_PRESSED; in adbhid_input_keycode()
384 if (ahid->flags & FLAG_FN_KEY_PRESSED) { in adbhid_input_keycode()
387 ahid->flags &= ~FLAG_EMU_FWDEL_DOWN; in adbhid_input_keycode()
389 ahid->flags |= FLAG_EMU_FWDEL_DOWN; in adbhid_input_keycode()
705 struct adbhid *ahid; in adbhid_kbd_capslock_remember() local
709 ahid = adbhid[i]; in adbhid_kbd_capslock_remember()
711 if (ahid && ahid->id == ADB_KEYBOARD) in adbhid_kbd_capslock_remember()
712 if (ahid->flags & FLAG_CAPSLOCK_TRANSLATE) in adbhid_kbd_capslock_remember()
713 ahid->flags |= FLAG_CAPSLOCK_IGNORE_NEXT; in adbhid_kbd_capslock_remember()