[PATCH 0/2] input layer and keyboard handling

Guillem Jover guillem.jover at nokia.com
Mon Apr 2 16:57:08 PDT 2007


Hi,

On the N800 we have a «keypad» with few keys, but it's not really a
keypad neither a keyboard (the actual keys supported are 1 28 62 63
64 65 66 103 105 106 108), so the input.keyboard capability seems
to not fit there.

Also when plugging a bluetooth keyboard we get two full keyboards,
which seems misleading, and UI apps might not know how to react
properly.

The proposed patches, first rename the keyboard addon to input addon,
which is already handling the input layer switches. And then generalizes
the capabilties by introducing input.keys and input.keypad.

Please comments, and this can wait for after the 0.5.9 release, of
course.

Here's some example output for the input devices on the N800:

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_1'
  info.capabilities = {'input'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'TSC2301 touchscreen'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_1'  (string)
  input.device = '/dev/input/event3'  (string)
  input.product = 'TSC2301 touchscreen'  (string)
  linux.device_file = '/dev/input/event3'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input3/event3'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'
  info.addons = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'input.keys'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'TSC2301 keypad'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'  (string)
  input.device = '/dev/input/event2'  (string)
  input.product = 'TSC2301 keypad'  (string)
  linux.device_file = '/dev/input/event2'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input2/event2'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input'
  button.has_state = false  (bool)
  button.type = 'power'  (string)
  info.addons = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'retu-pwrbutton'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input'  (string)
  input.device = '/dev/input/event0'  (string)
  input.product = 'retu-pwrbutton'  (string)
  linux.device_file = '/dev/input/event0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input0/event0'  (string)

udi = '/org/freedesktop/Hal/devices/platform_retu_headset_logicaldev_input'
  button.has_state = false  (bool)
  info.addons = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_retu_headset'  (string)
  info.product = 'retu-headset'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_retu_headset_logicaldev_input'  (string)
  input.device = '/dev/input/event1'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_retu_headset'  (string)
  input.physical_device = '/org/freedesktop/Hal/devices/platform_retu_headset'  (string)
  input.product = 'retu-headset'  (string)
  linux.device_file = '/dev/input/event1'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input1/event1'  (string)

udi = '/org/freedesktop/Hal/devices/platform_bluetooth_logicaldev_input'
  info.addons = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_bluetooth'  (string)
  info.product = 'CSR HIDEngine Keyboard'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_bluetooth_logicaldev_input'  (string)
  input.device = '/dev/input/event4'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_bluetooth'  (string)
  input.physical_device = '/org/freedesktop/Hal/devices/platform_bluetooth'  (string)
  input.product = 'CSR HIDEngine Keyboard'  (string)
  linux.device_file = '/dev/input/event4'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input4/event4'  (string)

regards,
guillem


More information about the hal mailing list