Re: Multimedia keys on Dell SK-8135

2010-11-26 Thread Kai Wang
Hi Peter,

On Fri, Nov 26, 2010 at 02:54:39PM +1100, Peter Jeremy wrote:
> [adding kaiw@ as per the wiki page]
> 
> On 2010-Nov-25 09:38:15 +0100, Hans Petter Selasky  wrote:
> >On Thursday 25 November 2010 04:42:30 Peter Jeremy wrote:
> >> I have a Dell SK-8135 keyboard which has multimedia keys in addition
> ...
> >http://wiki.freebsd.org/uhidd
> 
> Thanks.  I didn't think to search for multimedia keyboards in general.
> I've tried uhidd and, using it to manage the multimedia keys, it
> mostly works.  I want to use ukbd because I want a functioning
> keyboard in single-user mode and my mouse didn't get cleanly handled
> so I switched back to ums (which handles all my mouse functions).
> 
> The bit that doesn't work is the volume control:  The knob returns
> a HID code and a 7-bit 2-complement number defining the direction
> and rate (ie '1' is one click up, '127' is one click down).
> Unfortunately, xev shows that as soon as I move the volume control,
> I start receiving a continuous stream of alternating KeyPress and
> KeyRelease events until I kill uhidd.

Some time ago, We added support for this SK-8135 keyboard's linear
volume control by simulating VOLUME_UP and VOLUME_DOWN events. However
the code is not released yet; if you want to test it, you can check
out the source from our svn:

% svn checkout http://uhidd.googlecode.com/svn/trunk/ uhidd
% cd uhidd/uhidd
% make
# ./uhidd -vvv /.../ugenXXX

Also you need to change the configuration file:

> # Dell SK-8135
> 0x413c:0x2010={
>   cc_keymap={
>   Scan_Next_Track="0x7A"
>   Scan_Previous_Track="0x75"
>   Stop="0x74"
>   Play/Pause="0x7C"
>   Volume="0x64"

Remove "Volume" and use "Volume_Increment" and "Volume_Decrement" here
instead.

Kai
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Multimedia keys on Dell SK-8135

2010-11-25 Thread Peter Jeremy
[adding kaiw@ as per the wiki page]

On 2010-Nov-25 09:38:15 +0100, Hans Petter Selasky  wrote:
>On Thursday 25 November 2010 04:42:30 Peter Jeremy wrote:
>> I have a Dell SK-8135 keyboard which has multimedia keys in addition
...
>http://wiki.freebsd.org/uhidd

Thanks.  I didn't think to search for multimedia keyboards in general.
I've tried uhidd and, using it to manage the multimedia keys, it
mostly works.  I want to use ukbd because I want a functioning
keyboard in single-user mode and my mouse didn't get cleanly handled
so I switched back to ums (which handles all my mouse functions).

The bit that doesn't work is the volume control:  The knob returns
a HID code and a 7-bit 2-complement number defining the direction
and rate (ie '1' is one click up, '127' is one click down).
Unfortunately, xev shows that as soon as I move the volume control,
I start receiving a continuous stream of alternating KeyPress and
KeyRelease events until I kill uhidd.

I have attached my uhidd.conf file and the debug output from uhidd
(the second execution shows the effect of turning the volume control
faster).

Sample output from xev showing the volume control events:
KeyPress event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007489, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007530, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007530, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007571, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007571, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x101,
root 0x120, subw 0x0, time 7007612, (172,122), root:(913,147),
state 0x0, keycode 191 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

-- 
Peter Jeremy
Script started on Fri Nov 26 14:30:49 2010
# uhidd -vvv /dev/ugen1.3
ugen1.3[0]-> HID interface
ugen1.3[0]-> Report descriptor size = 65
ugen1.3[0]-> Find IN interrupt ep: 0x81 packet_size=0x8
ugen1.3[1]-> HID interface
ugen1.3[1]-> Report descriptor size = 142
ugen1.3[1]-> Find IN interrupt ep: 0x82 packet_size=0x4
HID APPLICATION COLLECTION (Keyboard) size(65)
  HID REPORT: ID 0
INPUT: 
  POS:0 SIZE:1 COUNT:8 [VARIABLE]
USAGE Keyboard LeftControl
USAGE Keyboard LeftShift
USAGE Keyboard LeftAlt
USAGE Keyboard Left GUI
USAGE Keyboard RightControl
USAGE Keyboard RightShift
USAGE Keyboard RightAlt
USAGE Keyboard Right GUI
  POS:8 SIZE:8 COUNT:1 [CONST]
  POS:16 SIZE:8 COUNT:6 [ARRAY]
USAGE [0 -> 255] (Keyboard)
OUTPUT: 
  POS:0 SIZE:1 COUNT:5 [VARIABLE]
USAGE Num Lock
USAGE Caps Lock
USAGE Scroll Lock
USAGE Compose
USAGE Kana
  POS:5 SIZE:3 COUNT:1 [CONST]
HID APPLICATION COLLECTION (Consumer Control) size(31)
  HID REPORT: ID 1
INPUT: 
  POS:0 SIZE:7 COUNT:1 [VARIABLE]
USAGE Volume
  POS:7 SIZE:1 COUNT:1 [VARIABLE]
USAGE Mute
HID APPLICATION COLLECTION (System Control) size(29)
  HID REPORT: ID 2
INPUT: 
  POS:0 SIZE:1 COUNT:3 [VARIABLE]
USAGE System Sleep
USAGE System Sleep
USAGE System Sleep
  POS:3 SIZE:1 COUNT:5 [CONST]
HID APPLICATION COLLECTION (Consumer Control) size(82)
  HID REPORT: ID 3
INPUT: 
  POS:0 SIZE:1 COUNT:1 [VARIABLE]
USAGE AC Refresh
  POS:1 SIZE:1 COUNT:1 [VARIABLE]
USAGE AL Local Machine Browser
  POS:2 SIZE:1 COUNT:1 [VARIABLE]
USAGE AC Home
  POS:3 SIZE:1 COUNT:1 [VARIABLE]
USAGE AL Email Reader
  POS:4 SIZE:1 COUNT:1 [VARIABLE]
USAGE AL Calculator
  POS:5 SIZE:1 COUNT:1 [VARIABLE]
USAGE AC Stop
  POS:6 SIZE:1 COUNT:1 [VARIABLE]
USAGE AC Forward
  POS:7 SIZE:1 COUNT:1 [VARIABLE]
USAGE AC Back
  POS:8 SIZE:1 COUNT:1 [VARIABLE]
USAGE Scan Next Track
  POS:9 SIZE

Re: Multimedia keys on Dell SK-8135

2010-11-25 Thread Hans Petter Selasky
On Thursday 25 November 2010 04:42:30 Peter Jeremy wrote:
> I have a Dell SK-8135 keyboard which has multimedia keys in addition
> to the normal PC105 keyboard.  As far as I can tell (by setting
> hw.usb.debug, hw.usb.ugen.debug, hw.usb.uhid.debug and
> hw.usb.ukbd.debug), the keys aren't generating any output.  I've done
> some searching and it looks like some people have had sucess getting
> the keys to work, at least on Linux, though it's not clear how.
> Can anyone help?
> 
> The keyboard includes an integrated hub and I have my mouse plugged
> into it.
> 
> I'm running FreeBSD-8.1/amd64

Have you looked at:

http://wiki.freebsd.org/uhidd

--HPS

> 
> Relevant output:
> 
> dmesg:
> ugen0.2:  at usbus0
> uhub6:  on usbus0
> uhub6: 3 ports with 2 removable, bus powered
> ugen0.3:  at usbus0
> ukbd0:  on usbus0
> kbd0 at ukbd0
> uhid0:  on usbus0
> ugen0.4:  at usbus0
> ums0:  on
> usbus0 ums0: 3 buttons and [XYZ] coordinates ID=0
> 
> $ usbconfig
> ugen0.1:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps)
> pwr=ON ugen1.1:  at usbus1, cfg=0 md=HOST spd=FULL
> (12Mbps) pwr=ON ugen2.1:  at usbus2, cfg=0 md=HOST
> spd=FULL (12Mbps) pwr=ON ugen3.1:  at usbus3, cfg=0
> md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1:  at usbus4,
> cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.2:  NEC Corporation> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
> ugen0.2:  at usbus0, cfg=0 md=HOST spd=FULL
> (12Mbps) pwr=SAVE ugen0.3:  at usbus0, cfg=0
> md=HOST spd=FULL (12Mbps) pwr=ON ugen0.4: 
> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON $ usbconfig -u 0 -a 3
> dump_device_desc
> ugen0.3:  at usbus0, cfg=0 md=HOST spd=FULL
> (12Mbps) pwr=ON
> 
>   bLength = 0x0012
>   bDescriptorType = 0x0001
>   bcdUSB = 0x0110
>   bDeviceClass = 0x
>   bDeviceSubClass = 0x
>   bDeviceProtocol = 0x
>   bMaxPacketSize0 = 0x0008
>   idVendor = 0x413c
>   idProduct = 0x2010
>   bcdDevice = 0x0200
>   iManufacturer = 0x0001  
>   iProduct = 0x0003  
>   iSerialNumber = 0x  
>   bNumConfigurations = 0x0001
> 
> $ usbconfig -u 0 -a 3 dump_curr_config_desc
> ugen0.3:  at usbus0, cfg=0 md=HOST spd=FULL
> (12Mbps) pwr=ON
> 
> 
>  Configuration index 0
> 
> bLength = 0x0009
> bDescriptorType = 0x0002
> wTotalLength = 0x003b
> bNumInterfaces = 0x0002
> bConfigurationValue = 0x0001
> iConfiguration = 0x0003  
> bmAttributes = 0x00a0
> bMaxPower = 0x0019
> 
> Interface 0
>   bLength = 0x0009
>   bDescriptorType = 0x0004
>   bInterfaceNumber = 0x
>   bAlternateSetting = 0x
>   bNumEndpoints = 0x0001
>   bInterfaceClass = 0x0003
>   bInterfaceSubClass = 0x0001
>   bInterfaceProtocol = 0x0001
>   iInterface = 0x0003  
> 
>   Additional Descriptor
> 
>   bLength = 0x09
>   bDescriptorType = 0x21
>   bDescriptorSubType = 0x10
>RAW dump:
>0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x41,
>0x08 | 0x00
> 
>  Endpoint 0
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0081  
> bmAttributes = 0x0003  
> wMaxPacketSize = 0x0008
> bInterval = 0x000a
> bRefresh = 0x
> bSynchAddress = 0x
> 
> 
> Interface 1
>   bLength = 0x0009
>   bDescriptorType = 0x0004
>   bInterfaceNumber = 0x0001
>   bAlternateSetting = 0x
>   bNumEndpoints = 0x0001
>   bInterfaceClass = 0x0003
>   bInterfaceSubClass = 0x
>   bInterfaceProtocol = 0x
>   iInterface = 0x0003  
> 
>   Additional Descriptor
> 
>   bLength = 0x09
>   bDescriptorType = 0x21
>   bDescriptorSubType = 0x10
>RAW dump:
>0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x8e,
>0x08 | 0x00
> 
>  Endpoint 0
> bLength = 0x0007
> bDescriptorType = 0x0005
> bEndpointAddress = 0x0082  
> bmAttributes = 0x0003  
> wMaxPacketSize = 0x0004
> bInterval = 0x00ff
> bRefresh = 0x
> bSynchAddress = 0x
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Multimedia keys on Dell SK-8135

2010-11-24 Thread Peter Jeremy
I have a Dell SK-8135 keyboard which has multimedia keys in addition
to the normal PC105 keyboard.  As far as I can tell (by setting
hw.usb.debug, hw.usb.ugen.debug, hw.usb.uhid.debug and
hw.usb.ukbd.debug), the keys aren't generating any output.  I've done
some searching and it looks like some people have had sucess getting
the keys to work, at least on Linux, though it's not clear how.
Can anyone help?

The keyboard includes an integrated hub and I have my mouse plugged
into it.

I'm running FreeBSD-8.1/amd64

Relevant output:

dmesg:
ugen0.2:  at usbus0
uhub6:  on usbus0
uhub6: 3 ports with 2 removable, bus powered
ugen0.3:  at usbus0
ukbd0:  on usbus0
kbd0 at ukbd0
uhid0:  on usbus0
ugen0.4:  at usbus0
ums0:  on usbus0
ums0: 3 buttons and [XYZ] coordinates ID=0

$ usbconfig
ugen0.1:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen1.1:  at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen2.1:  at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen3.1:  at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen4.1:  at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=ON
ugen4.2:  at usbus4, cfg=0 md=HOST 
spd=HIGH (480Mbps) pwr=SAVE
ugen0.2:  at usbus0, cfg=0 md=HOST spd=FULL 
(12Mbps) pwr=SAVE
ugen0.3:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=ON
ugen0.4:  at usbus0, cfg=0 md=HOST spd=LOW 
(1.5Mbps) pwr=ON
$ usbconfig -u 0 -a 3 dump_device_desc
ugen0.3:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x413c 
  idProduct = 0x2010 
  bcdDevice = 0x0200 
  iManufacturer = 0x0001  
  iProduct = 0x0003  
  iSerialNumber = 0x  
  bNumConfigurations = 0x0001 

$ usbconfig -u 0 -a 3 dump_curr_config_desc
ugen0.3:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=ON


 Configuration index 0

bLength = 0x0009 
bDescriptorType = 0x0002 
wTotalLength = 0x003b 
bNumInterfaces = 0x0002 
bConfigurationValue = 0x0001 
iConfiguration = 0x0003  
bmAttributes = 0x00a0 
bMaxPower = 0x0019 

Interface 0
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0001 
  bInterfaceClass = 0x0003 
  bInterfaceSubClass = 0x0001 
  bInterfaceProtocol = 0x0001 
  iInterface = 0x0003  

  Additional Descriptor

  bLength = 0x09
  bDescriptorType = 0x21
  bDescriptorSubType = 0x10
   RAW dump: 
   0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x41, 
   0x08 | 0x00

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0081  
bmAttributes = 0x0003  
wMaxPacketSize = 0x0008 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x 


Interface 1
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x0001 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0001 
  bInterfaceClass = 0x0003 
  bInterfaceSubClass = 0x 
  bInterfaceProtocol = 0x 
  iInterface = 0x0003  

  Additional Descriptor

  bLength = 0x09
  bDescriptorType = 0x21
  bDescriptorSubType = 0x10
   RAW dump: 
   0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x8e, 
   0x08 | 0x00

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0082  
bmAttributes = 0x0003  
wMaxPacketSize = 0x0004 
bInterval = 0x00ff 
bRefresh = 0x 
bSynchAddress = 0x 

-- 
Peter Jeremy


pgpsHPLugzIo3.pgp
Description: PGP signature