Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hid/hcons.c
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | case HIDMAP_CB_IS_RUNNING: | ||||
/* Nothing to report. */ | /* Nothing to report. */ | ||||
if (ctx.data == 0) | if (ctx.data == 0) | ||||
return (ENOMSG); | return (ENOMSG); | ||||
code = ctx.data > 0 ? KEY_VOLUMEUP : KEY_VOLUMEDOWN; | code = ctx.data > 0 ? KEY_VOLUMEUP : KEY_VOLUMEDOWN; | ||||
for (nrepeats = abs(ctx.data); nrepeats > 0; nrepeats--) { | for (nrepeats = abs(ctx.data); nrepeats > 0; nrepeats--) { | ||||
evdev_push_key(evdev, code, 1); | evdev_push_key(evdev, code, 1); | ||||
evdev_push_key(evdev, code, 0); | evdev_push_key(evdev, code, 0); | ||||
} | } | ||||
break; | |||||
default: | |||||
break; | |||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hcons_probe(device_t dev) | hcons_probe(device_t dev) | ||||
{ | { | ||||
Show All 33 Lines |