Lines Matching +full:0 +full:x185
74 static uint16_t const keymap[0x100] = {
75 /* 0x00 - 0x27 */
81 /* 0x28 - 0x3f */
88 /* 0x40 - 0x5f */
97 /* 0x60 - 0x7f */
106 /* 0x80 - 0x9f */
115 /* 0xa0 - 0xbf */
124 /* 0xc0 - 0xdf */
133 /* 0xe0 - 0xff */
145 static uint16_t const consmap[0x300] = {
146 [0x030] = KEY_POWER,
147 [0x031] = KEY_RESTART,
148 [0x032] = KEY_SLEEP,
149 [0x034] = KEY_SLEEP,
150 [0x035] = KEY_KBDILLUMTOGGLE,
151 [0x036] = BTN_MISC,
152 [0x040] = KEY_MENU,
153 [0x041] = KEY_SELECT,
154 [0x042] = KEY_UP,
155 [0x043] = KEY_DOWN,
156 [0x044] = KEY_LEFT,
157 [0x045] = KEY_RIGHT,
158 [0x046] = KEY_ESC,
159 [0x047] = KEY_KPPLUS,
160 [0x048] = KEY_KPMINUS,
161 [0x060] = KEY_INFO,
162 [0x061] = KEY_SUBTITLE,
163 [0x063] = KEY_VCR,
164 [0x065] = KEY_CAMERA,
165 [0x069] = KEY_RED,
166 [0x06a] = KEY_GREEN,
167 [0x06b] = KEY_BLUE,
168 [0x06c] = KEY_YELLOW,
169 [0x06d] = KEY_ZOOM,
170 [0x06f] = KEY_BRIGHTNESSUP,
171 [0x070] = KEY_BRIGHTNESSDOWN,
172 [0x072] = KEY_BRIGHTNESS_TOGGLE,
173 [0x073] = KEY_BRIGHTNESS_MIN,
174 [0x074] = KEY_BRIGHTNESS_MAX,
175 [0x075] = KEY_BRIGHTNESS_AUTO,
176 [0x082] = KEY_VIDEO_NEXT,
177 [0x083] = KEY_LAST,
178 [0x084] = KEY_ENTER,
179 [0x088] = KEY_PC,
180 [0x089] = KEY_TV,
181 [0x08a] = KEY_WWW,
182 [0x08b] = KEY_DVD,
183 [0x08c] = KEY_PHONE,
184 [0x08d] = KEY_PROGRAM,
185 [0x08e] = KEY_VIDEOPHONE,
186 [0x08f] = KEY_GAMES,
187 [0x090] = KEY_MEMO,
188 [0x091] = KEY_CD,
189 [0x092] = KEY_VCR,
190 [0x093] = KEY_TUNER,
191 [0x094] = KEY_EXIT,
192 [0x095] = KEY_HELP,
193 [0x096] = KEY_TAPE,
194 [0x097] = KEY_TV2,
195 [0x098] = KEY_SAT,
196 [0x09a] = KEY_PVR,
197 [0x09c] = KEY_CHANNELUP,
198 [0x09d] = KEY_CHANNELDOWN,
199 [0x0a0] = KEY_VCR2,
200 [0x0b0] = KEY_PLAY,
201 [0x0b1] = KEY_PAUSE,
202 [0x0b2] = KEY_RECORD,
203 [0x0b3] = KEY_FASTFORWARD,
204 [0x0b4] = KEY_REWIND,
205 [0x0b5] = KEY_NEXTSONG,
206 [0x0b6] = KEY_PREVIOUSSONG,
207 [0x0b7] = KEY_STOPCD,
208 [0x0b8] = KEY_EJECTCD,
209 [0x0bc] = KEY_MEDIA_REPEAT,
210 [0x0b9] = KEY_SHUFFLE,
211 [0x0bf] = KEY_SLOW,
212 [0x0cd] = KEY_PLAYPAUSE,
213 [0x0cf] = KEY_VOICECOMMAND,
214 [0x0e2] = KEY_MUTE,
215 [0x0e5] = KEY_BASSBOOST,
216 [0x0e9] = KEY_VOLUMEUP,
217 [0x0ea] = KEY_VOLUMEDOWN,
218 [0x0f5] = KEY_SLOW,
219 [0x181] = KEY_BUTTONCONFIG,
220 [0x182] = KEY_BOOKMARKS,
221 [0x183] = KEY_CONFIG,
222 [0x184] = KEY_WORDPROCESSOR,
223 [0x185] = KEY_EDITOR,
224 [0x186] = KEY_SPREADSHEET,
225 [0x187] = KEY_GRAPHICSEDITOR,
226 [0x188] = KEY_PRESENTATION,
227 [0x189] = KEY_DATABASE,
228 [0x18a] = KEY_MAIL,
229 [0x18b] = KEY_NEWS,
230 [0x18c] = KEY_VOICEMAIL,
231 [0x18d] = KEY_ADDRESSBOOK,
232 [0x18e] = KEY_CALENDAR,
233 [0x18f] = KEY_TASKMANAGER,
234 [0x190] = KEY_JOURNAL,
235 [0x191] = KEY_FINANCE,
236 [0x192] = KEY_CALC,
237 [0x193] = KEY_PLAYER,
238 [0x194] = KEY_FILE,
239 [0x196] = KEY_WWW,
240 [0x199] = KEY_CHAT,
241 [0x19c] = KEY_LOGOFF,
242 [0x19e] = KEY_COFFEE,
243 [0x19f] = KEY_CONTROLPANEL,
244 [0x1a2] = KEY_APPSELECT,
245 [0x1a3] = KEY_NEXT,
246 [0x1a4] = KEY_PREVIOUS,
247 [0x1a6] = KEY_HELP,
248 [0x1a7] = KEY_DOCUMENTS,
249 [0x1ab] = KEY_SPELLCHECK,
250 [0x1ae] = KEY_KEYBOARD,
251 [0x1b1] = KEY_SCREENSAVER,
252 [0x1b4] = KEY_FILE,
253 [0x1b6] = KEY_IMAGES,
254 [0x1b7] = KEY_AUDIO,
255 [0x1b8] = KEY_VIDEO,
256 [0x1bc] = KEY_MESSENGER,
257 [0x1bd] = KEY_INFO,
258 [0x201] = KEY_NEW,
259 [0x202] = KEY_OPEN,
260 [0x203] = KEY_CLOSE,
261 [0x204] = KEY_EXIT,
262 [0x207] = KEY_SAVE,
263 [0x208] = KEY_PRINT,
264 [0x209] = KEY_PROPS,
265 [0x21a] = KEY_UNDO,
266 [0x21b] = KEY_COPY,
267 [0x21c] = KEY_CUT,
268 [0x21d] = KEY_PASTE,
269 [0x21f] = KEY_FIND,
270 [0x221] = KEY_SEARCH,
271 [0x222] = KEY_GOTO,
272 [0x223] = KEY_HOMEPAGE,
273 [0x224] = KEY_BACK,
274 [0x225] = KEY_FORWARD,
275 [0x226] = KEY_STOP,
276 [0x227] = KEY_REFRESH,
277 [0x22a] = KEY_BOOKMARKS,
278 [0x22d] = KEY_ZOOMIN,
279 [0x22e] = KEY_ZOOMOUT,
280 [0x22f] = KEY_ZOOMRESET,
281 [0x233] = KEY_SCROLLUP,
282 [0x234] = KEY_SCROLLDOWN,
283 [0x23d] = KEY_EDIT,
284 [0x25f] = KEY_CANCEL,
285 [0x269] = KEY_INSERT,
286 [0x26a] = KEY_DELETE,
287 [0x279] = KEY_REDO,
288 [0x289] = KEY_REPLY,
289 [0x28b] = KEY_FORWARDMAIL,
290 [0x28c] = KEY_SEND,
291 [0x2c7] = KEY_KBDINPUTASSIST_PREV,
292 [0x2c8] = KEY_KBDINPUTASSIST_NEXT,
293 [0x2c9] = KEY_KBDINPUTASSIST_PREVGROUP,
294 [0x2ca] = KEY_KBDINPUTASSIST_NEXTGROUP,
295 [0x2cb] = KEY_KBDINPUTASSIST_ACCEPT,
296 [0x2cc] = KEY_KBDINPUTASSIST_CANCEL,
316 memset(&uisetup, 0, sizeof(uisetup)); in uinput_open_common()
326 if (ioctl(fd, UI_SET_PHYS, phys) < 0 || in uinput_open_common()
327 ioctl(fd, UI_SET_BSDUNIQ, uniq) < 0 || in uinput_open_common()
328 ioctl(fd, UI_DEV_SETUP, &uisetup) < 0) in uinput_open_common()
346 if ((fd = uinput_open_common(p, local, "Bluetooth Mouse")) < 0) in uinput_open_mouse()
350 if (ioctl(fd, UI_SET_EVBIT, EV_SYN) < 0 || in uinput_open_mouse()
351 ioctl(fd, UI_SET_EVBIT, EV_KEY) < 0 || in uinput_open_mouse()
352 ioctl(fd, UI_SET_EVBIT, EV_REL) < 0 || in uinput_open_mouse()
353 ioctl(fd, UI_SET_RELBIT, REL_X) < 0 || in uinput_open_mouse()
354 ioctl(fd, UI_SET_RELBIT, REL_Y) < 0 || in uinput_open_mouse()
355 (p->has_wheel && ioctl(fd, UI_SET_RELBIT, REL_WHEEL) < 0) || in uinput_open_mouse()
356 (p->has_hwheel && ioctl(fd, UI_SET_RELBIT, REL_HWHEEL) < 0) || in uinput_open_mouse()
357 ioctl(fd, UI_SET_PROPBIT, INPUT_PROP_POINTER) < 0) in uinput_open_mouse()
361 for (i = 0; i < nitems(mbuttons); i++) in uinput_open_mouse()
362 if (ioctl(fd, UI_SET_KEYBIT, mbuttons[i]) < 0) in uinput_open_mouse()
365 if (ioctl(fd, UI_DEV_CREATE) >= 0) in uinput_open_mouse()
369 if (fd >= 0) in uinput_open_mouse()
385 if ((fd = uinput_open_common(p, local, "Bluetooth Keyboard")) < 0) in uinput_open_keyboard()
389 if (ioctl(fd, UI_SET_EVBIT, EV_KEY) < 0 || in uinput_open_keyboard()
390 ioctl(fd, UI_SET_EVBIT, EV_LED) < 0 || in uinput_open_keyboard()
391 ioctl(fd, UI_SET_EVBIT, EV_SYN) < 0 || in uinput_open_keyboard()
392 ioctl(fd, UI_SET_EVBIT, EV_REP) < 0 || in uinput_open_keyboard()
393 ioctl(fd, UI_SET_LEDBIT, LED_CAPSL) < 0 || in uinput_open_keyboard()
394 ioctl(fd, UI_SET_LEDBIT, LED_NUML) < 0 || in uinput_open_keyboard()
399 for (i = 0; i < nitems(keymap); i++) in uinput_open_keyboard()
401 ioctl(fd, UI_SET_KEYBIT, keymap[i]) < 0) in uinput_open_keyboard()
406 for (i = 0; i < nitems(consmap); i++) { in uinput_open_keyboard()
408 ioctl(fd, UI_SET_KEYBIT, consmap[i]) < 0) in uinput_open_keyboard()
413 if (ioctl(fd, UI_DEV_CREATE) >= 0) in uinput_open_keyboard()
417 if (fd >= 0) in uinput_open_keyboard()
432 static struct timespec last = { 0, 0 }; in uinput_get_rcpt_mask()
434 static int32_t mask = 0; in uinput_get_rcpt_mask()
447 if (sysctlbyname(MASK_SYSCTL, &mask, &len, NULL, 0) < 0) { in uinput_get_rcpt_mask()
452 mask = 0; in uinput_get_rcpt_mask()
464 assert(fd >= 0); in uinput_write_event()
466 memset(&ie, 0, sizeof(ie)); in uinput_write_event()
480 assert(fd >= 0); in uinput_rep_mouse()
484 return (0); in uinput_rep_mouse()
486 if ((x != 0 && uinput_write_event(fd, EV_REL, REL_X, x) < 0) || in uinput_rep_mouse()
487 (y != 0 && uinput_write_event(fd, EV_REL, REL_Y, y) < 0) || in uinput_rep_mouse()
488 (z != 0 && uinput_write_event(fd, EV_REL, REL_WHEEL, -z) < 0) || in uinput_rep_mouse()
489 (t != 0 && uinput_write_event(fd, EV_REL, REL_HWHEEL, t) < 0)) in uinput_rep_mouse()
492 for (i = 0; i < nitems(mbuttons); i++) { in uinput_rep_mouse()
497 (buttons & mask) != 0) < 0) in uinput_rep_mouse()
501 if (uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) < 0) in uinput_rep_mouse()
504 return (0); in uinput_rep_mouse()
515 assert(fd >= 0); in uinput_rep_key()
519 return (0); in uinput_rep_key()
521 if (key >= 0 && key < (int32_t)nitems(keymap) && in uinput_rep_key()
523 if (uinput_write_event(fd, EV_KEY, keymap[key], make) > 0 && in uinput_rep_key()
524 uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) > 0) in uinput_rep_key()
525 return (0); in uinput_rep_key()
538 assert(fd >= 0); in uinput_rep_cons()
542 return (0); in uinput_rep_cons()
544 if (key >= 0 && key < (int32_t)nitems(consmap) && in uinput_rep_cons()
546 if (uinput_write_event(fd, EV_KEY, consmap[key], make) > 0 && in uinput_rep_cons()
547 uinput_write_event(fd, EV_SYN, SYN_REPORT, 0) > 0) in uinput_rep_cons()
548 return (0); in uinput_rep_cons()
562 assert(fd >= 0); in uinput_rep_leds()
566 return (0); in uinput_rep_leds()
568 for (i = 0; i < nitems(led_codes); i++) { in uinput_rep_leds()
571 state & (1 << i) ? 1 : 0) < 0) in uinput_rep_leds()
575 return (0); in uinput_rep_leds()
589 assert(s->vkbd >= 0); in uinput_kbd_status_changed()
597 for (i = 0; i < nitems(led_codes); i++) { in uinput_kbd_status_changed()
615 return (0); in uinput_kbd_status_changed()