Mageia Bugzilla – Attachment 701 Details for
Bug 1099
Numlock package is not installed on laptops with numpads (only on desktops)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
detect (some) numpads
numpad.diff (text/plain), 2.41 KB, created by
Thierry Vignaud
on 2011-08-01 10:38:33 CEST
(
hide
)
Description:
detect (some) numpads
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2011-08-01 10:38:33 CEST
Size:
2.41 KB
patch
obsolete
>(getInputDevices,hasNumpad) detect (at least some (eg: Compaq USB numpad) > >diff -up ./detect_devices.pm.tv6 ./detect_devices.pm >--- ./detect_devices.pm.tv6 2011-08-01 08:21:47.101268314 +0000 >+++ ./detect_devices.pm 2011-08-01 08:25:07.525308413 +0000 >@@ -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() } >diff -up ./install/share/rpmsrate-raw.tv6 ./install/share/rpmsrate-raw >--- ./install/share/rpmsrate-raw.tv6 2011-08-01 08:34:55.516448165 +0000 >+++ ./install/share/rpmsrate-raw 2011-08-01 08:35:43.999460982 +0000 >@@ -727,9 +727,10 @@ CAT_SYSTEM > > 5 pm-utils > 5 TYPE"laptop" cpufreq >- 5 TYPE"laptop" CAT_KDE kcm_touchpad >+ 5 TYPE"touchpad" CAT_KDE kcm_touchpad > 5 TYPE"laptop" CAT_KDE plasma-applet-battery > 5 !TYPE"laptop" numlock >+ 5 TYPE"touchpad" numlock > > 5 lftp > 4 hexedit strace sudo procmail hdparm coreutils-doc bc
(getInputDevices,hasNumpad) detect (at least some (eg: Compaq USB numpad) diff -up ./detect_devices.pm.tv6 ./detect_devices.pm --- ./detect_devices.pm.tv6 2011-08-01 08:21:47.101268314 +0000 +++ ./detect_devices.pm 2011-08-01 08:25:07.525308413 +0000 @@ -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() } diff -up ./install/share/rpmsrate-raw.tv6 ./install/share/rpmsrate-raw --- ./install/share/rpmsrate-raw.tv6 2011-08-01 08:34:55.516448165 +0000 +++ ./install/share/rpmsrate-raw 2011-08-01 08:35:43.999460982 +0000 @@ -727,9 +727,10 @@ CAT_SYSTEM 5 pm-utils 5 TYPE"laptop" cpufreq - 5 TYPE"laptop" CAT_KDE kcm_touchpad + 5 TYPE"touchpad" CAT_KDE kcm_touchpad 5 TYPE"laptop" CAT_KDE plasma-applet-battery 5 !TYPE"laptop" numlock + 5 TYPE"touchpad" numlock 5 lftp 4 hexedit strace sudo procmail hdparm coreutils-doc bc
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1099
: 701 |
940
|
941
|
943
|
1180