diff options
author | Thierry Vignaud <tv@mageia.org> | 2011-08-01 10:32:26 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2011-08-01 10:32:26 +0000 |
commit | 52f816ab4fa963ffe3ff66333162f933b899fcbf (patch) | |
tree | e87c9c094d798e2d175ccb7d537e07bea7582f4d /perl-install/detect_devices.pm | |
parent | d0b618f98b31b524fe56f11cad8ddbabeb9caa43 (diff) | |
download | drakx-52f816ab4fa963ffe3ff66333162f933b899fcbf.tar drakx-52f816ab4fa963ffe3ff66333162f933b899fcbf.tar.gz drakx-52f816ab4fa963ffe3ff66333162f933b899fcbf.tar.bz2 drakx-52f816ab4fa963ffe3ff66333162f933b899fcbf.tar.xz drakx-52f816ab4fa963ffe3ff66333162f933b899fcbf.zip |
(getInputDevices,hasNumpad) detect (at least some (eg: Compaq USB numpad) (#1099)
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 6e5b28f1a..d2d6561bd 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -511,9 +511,19 @@ sub getInputDevices() { #- B: KEY=1c43 0 70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE TOOL_PEN TOOL_RUBBER TOOL_FINGER TOOL_MOUSE TOUCH STYLUS STYLUS2 #- B: ABS=100 3000003 #=> X Y PRESSURE DISTANCE MISC + #I: Bus=0003 Vendor=049f Product=0024 Version=0001 + #N: Name="Compaq Compaq Numeric Keypad" + #P: Phys=usb-0000:00:03.2-2/input0 + #S: Sysfs=/class/input/input7 + #H: Handlers=kbd event3 + #B: EV=120003 + #B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe + #B: LED=1f + $device->{Synaptics} = $descr eq 'SynPS/2 Synaptics TouchPad'; $device->{ALPS} = $descr =~ m!^AlpsPS/2 ALPS!; $device->{Elantech} = $descr eq 'ETPS/2 Elantech Touchpad'; + $device->{Numpad} = $descr =~ /Numeric Keypad/; } elsif (/H: Handlers=(.*)/) { my @l = split(' ', $1); @@ -1228,6 +1238,7 @@ sub matching_types() { mips_ict => is_mips_ict(), mips_st_ls2f => is_mips_st_ls2f(), laptop => isLaptop(), + 'numpad' => hasNumpad(), 'touchpad' => hasTouchpad(), '64bit' => to_bool(arch() =~ /64/), wireless => to_bool(get_wireless_interface() || probe_category('network/wireless')), @@ -1236,6 +1247,7 @@ sub matching_types() { sub hasWacom() { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() } sub hasTouchpad() { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() } +sub hasNumpad() { any { $_->{Numpad} } getInputDevices() } sub usbWacom() { grep { $_->{vendor} eq '056a' } getInputDevices() } sub usbKeyboards() { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() } |