Lines Matching refs:key
28 struct key_entry *key; in sparse_keymap_get_key_index() local
31 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index()
32 if (key->type == KE_KEY) { in sparse_keymap_get_key_index()
33 if (key == k) in sparse_keymap_get_key_index()
45 struct key_entry *key; in sparse_keymap_entry_by_index() local
48 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index()
49 if (key->type == KE_KEY) in sparse_keymap_entry_by_index()
51 return key; in sparse_keymap_entry_by_index()
67 struct key_entry *key; in sparse_keymap_entry_from_scancode() local
69 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_scancode()
70 if (code == key->code) in sparse_keymap_entry_from_scancode()
71 return key; in sparse_keymap_entry_from_scancode()
88 struct key_entry *key; in sparse_keymap_entry_from_keycode() local
90 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_keycode()
91 if (key->type == KE_KEY && keycode == key->keycode) in sparse_keymap_entry_from_keycode()
92 return key; in sparse_keymap_entry_from_keycode()
101 struct key_entry *key; in sparse_keymap_locate() local
105 key = sparse_keymap_entry_by_index(dev, ke->index); in sparse_keymap_locate()
107 key = sparse_keymap_entry_from_scancode(dev, scancode); in sparse_keymap_locate()
109 key = NULL; in sparse_keymap_locate()
111 return key; in sparse_keymap_locate()
117 const struct key_entry *key; in sparse_keymap_getkeycode() local
120 key = sparse_keymap_locate(dev, ke); in sparse_keymap_getkeycode()
121 if (key && key->type == KE_KEY) { in sparse_keymap_getkeycode()
122 ke->keycode = key->keycode; in sparse_keymap_getkeycode()
125 sparse_keymap_get_key_index(dev, key); in sparse_keymap_getkeycode()
126 ke->len = sizeof(key->code); in sparse_keymap_getkeycode()
127 memcpy(ke->scancode, &key->code, sizeof(key->code)); in sparse_keymap_getkeycode()
139 struct key_entry *key; in sparse_keymap_setkeycode() local
142 key = sparse_keymap_locate(dev, ke); in sparse_keymap_setkeycode()
143 if (key && key->type == KE_KEY) { in sparse_keymap_setkeycode()
144 *old_keycode = key->keycode; in sparse_keymap_setkeycode()
145 key->keycode = ke->keycode; in sparse_keymap_setkeycode()