Bug 14787 - Ortek Wireless Keyboard with Touchpad - Keyboard does not work
Summary: Ortek Wireless Keyboard with Touchpad - Keyboard does not work
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P2 normal
Assignee: Jiri Kosina
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-11 14:30 UTC by jmharris
Modified: 2011-01-07 11:45 UTC (History)
9 users (show)

See Also:
Kernel Version: 2.6.31
Tree: Mainline
Regression: No


Attachments
USB resource descriptor fix in new Ortek USB HID driver for Linux 2.6.32.3 (4.28 KB, patch)
2010-01-11 23:23 UTC, jmharris
Details | Diff
USB resource descriptor fix in new Ortek USB HID driver for Linux 2.6.32.3 (unified diff) (4.26 KB, patch)
2010-01-12 18:47 UTC, jmharris
Details | Diff

Description jmharris 2009-12-11 14:30:05 UTC
Problem with '2.4GHz Entertainment Slim Keyboard with Smart Touchpad', a combination keyboard/touchpad produced by Ortek. This is the keyboard at http://www.ebuyer.com/product/158377

Basically, the keyboard section of this device does not work, i.e. no keypresses are detected. The touchpad and meta keys (ctrl+alt+win) work correctly. All keys work correctly in the bios and grub.

This issue has been tracked so far here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/405390

Investigation has found that the keypresses are reported when /sys/module/hid/parameters/debug is on e.g.

kernel: [ 1228.799642] drivers/hid/hid-core.c: report 3 (size 5) = 03 00 02 fe 00

But no corresponding output is received at the relevant /dev/input device.

The ubuntu bug already contains attachments with debug logs when connecting the device, please let me know what other information is required to help debug this.
Comment 1 jmharris 2009-12-14 23:23:44 UTC
Output from catting the relevant /dev/hidraw device is the same as from a working keyboard, but nothing is received on the corresponding /dev/input/event interface.

Can anyone give any pointers where to go from here? If the same output is received on hidraw then what is involved in generating the evdev output?
Comment 2 jmharris 2009-12-15 23:38:28 UTC
I have now fixed this problem locally, the logical maximum value in the usb resource descriptor is incorrect for the keyboard. I worked out the value that needed fixing and modified the existing usb quirk driver for the sunplus keyboard to test it.

I need to generate a more appropriate kernel patch from my changes and submit it to whoever is responsible. If anyone can help with this please let me know, I haven't done any development in the kernel before.

The basic solution approach until a decent patch is available:

The USB resource description (for the keyboard part of the device) is:
05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03 91 01 05 07 19 00 29 91 15 00 25 01 75 08 95 06 81 00 c0

When you cat the relevant rdesc for the device in /sys/kernel/debug/hid this indicates Field(1) has a usage of 146 but the logical maximum is 1. I see from the kernel source code that resource descriptor fixes have been done for other HID devices so I hacked in the manufacturer and device id (0x05a4 and 0x2000 respectively) into hid-ids.h. Then I consulted the USB specification and hijacked the sunplus keyboard quirk driver code to modify the appropriate rdesc bytes simply as follows:

rdesc[55] = 0xff;

Obviously this raises the logical maximum to 255, that may be excessive. Need to review what a sane value for this should be.

I also have the MULTI_INPUT quirk enabled by altering hid-quirks.c which gives me several more /dev/input/event devices for the keyboard and trackpad on this device, but that was done before the rdesc fix- maybe it is not important in order to get the main keyboard working.
Comment 3 Daniel J Blueman 2010-01-03 21:17:37 UTC
Comparing the keyboard USB HID resource descriptor (.0002 is the media keys), Ortek Smartpad:

# cat /sys/kernel/debug/hid/0003:05A4:2000.0001/rdesc
05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03 91 01 05 07 19 00 29 91 15 00 25 01 75 08 95 06 81 00 c0 

  INPUT[INPUT]
    Field(0)
      Usage(8)
        Keyboard.00e0
        Keyboard.00e1
        Keyboard.00e2
        Keyboard.00e3
        Keyboard.00e4
        Keyboard.00e5
        Keyboard.00e6
        Keyboard.00e7
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(8)
      Report Offset(0)
      Flags( Variable Absolute )
    Field(1)
      Usage(146)
        Keyboard.0000
        Keyboard.0001
        Keyboard.0002
        Keyboard.0003
        Keyboard.0004
        Keyboard.0005
        Keyboard.0006
        Keyboard.0007
        Keyboard.0008
        Keyboard.0009
        Keyboard.000a
        Keyboard.000b
        Keyboard.000c
        Keyboard.000d
        Keyboard.000e
        Keyboard.000f
        Keyboard.0010
        Keyboard.0011
        Keyboard.0012
        Keyboard.0013
        Keyboard.0014
        Keyboard.0015
        Keyboard.0016
        Keyboard.0017
        Keyboard.0018
        Keyboard.0019
        Keyboard.001a
        Keyboard.001b
        Keyboard.001c
        Keyboard.001d
        Keyboard.001e
        Keyboard.001f
        Keyboard.0020
        Keyboard.0021
        Keyboard.0022
        Keyboard.0023
        Keyboard.0024
        Keyboard.0025
        Keyboard.0026
        Keyboard.0027
        Keyboard.0028
        Keyboard.0029
        Keyboard.002a
        Keyboard.002b
        Keyboard.002c
        Keyboard.002d
        Keyboard.002e
        Keyboard.002f
        Keyboard.0030
        Keyboard.0031
        Keyboard.0032
        Keyboard.0033
        Keyboard.0034
        Keyboard.0035
        Keyboard.0036
        Keyboard.0037
        Keyboard.0038
        Keyboard.0039
        Keyboard.003a
        Keyboard.003b
        Keyboard.003c
        Keyboard.003d
        Keyboard.003e
        Keyboard.003f
        Keyboard.0040
        Keyboard.0041
        Keyboard.0042
        Keyboard.0043
        Keyboard.0044
        Keyboard.0045
        Keyboard.0046
        Keyboard.0047
        Keyboard.0048
        Keyboard.0049
        Keyboard.004a
        Keyboard.004b
        Keyboard.004c
        Keyboard.004d
        Keyboard.004e
        Keyboard.004f
        Keyboard.0050
        Keyboard.0051
        Keyboard.0052
        Keyboard.0053
        Keyboard.0054
        Keyboard.0055
        Keyboard.0056
        Keyboard.0057
        Keyboard.0058
        Keyboard.0059
        Keyboard.005a
        Keyboard.005b
        Keyboard.005c
        Keyboard.005d
        Keyboard.005e
        Keyboard.005f
        Keyboard.0060
        Keyboard.0061
        Keyboard.0062
        Keyboard.0063
        Keyboard.0064
        Keyboard.0065
        Keyboard.0066
        Keyboard.0067
        Keyboard.0068
        Keyboard.0069
        Keyboard.006a
        Keyboard.006b
        Keyboard.006c
        Keyboard.006d
        Keyboard.006e
        Keyboard.006f
        Keyboard.0070
        Keyboard.0071
        Keyboard.0072
        Keyboard.0073
        Keyboard.0074
        Keyboard.0075
        Keyboard.0076
        Keyboard.0077
        Keyboard.0078
        Keyboard.0079
        Keyboard.007a
        Keyboard.007b
        Keyboard.007c
        Keyboard.007d
        Keyboard.007e
        Keyboard.007f
        Keyboard.0080
        Keyboard.0081
        Keyboard.0082
        Keyboard.0083
        Keyboard.0084
        Keyboard.0085
        Keyboard.0086
        Keyboard.0087
        Keyboard.0088
        Keyboard.0089
        Keyboard.008a
        Keyboard.008b
        Keyboard.008c
        Keyboard.008d
        Keyboard.008e
        Keyboard.008f
        Keyboard.0090
        Keyboard.0091
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(8)
      Report Count(6)
      Report Offset(16)
      Flags( Array Absolute )
  OUTPUT[OUTPUT]
    Field(0)
      Usage(5)
        LED.NumLock
        LED.CapsLock
        LED.ScrollLock
        LED.Compose
        LED.Kana
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(5)
      Report Offset(0)
      Flags( Variable Absolute )

Keyboard.00e0 ---> Key.LeftControl
Keyboard.00e1 ---> Key.LeftShift
Keyboard.00e2 ---> Key.LeftAlt
Keyboard.00e3 ---> Key.LeftMeta
Keyboard.00e4 ---> Key.RightCtrl
Keyboard.00e5 ---> Key.RightShift
Keyboard.00e6 ---> Key.RightAlt
Keyboard.00e7 ---> Key.RightMeta
Keyboard.0000 ---> Sync.Report
Keyboard.0001 ---> Sync.Report
Keyboard.0002 ---> Sync.Report
Keyboard.0003 ---> Sync.Report
Keyboard.0004 ---> Key.A
Keyboard.0005 ---> Key.B
Keyboard.0006 ---> Key.C
Keyboard.0007 ---> Key.D
Keyboard.0008 ---> Key.E
Keyboard.0009 ---> Key.F
Keyboard.000a ---> Key.G
Keyboard.000b ---> Key.H
Keyboard.000c ---> Key.I
Keyboard.000d ---> Key.J
Keyboard.000e ---> Key.K
Keyboard.000f ---> Key.L
Keyboard.0010 ---> Key.M
Keyboard.0011 ---> Key.N
Keyboard.0012 ---> Key.O
Keyboard.0013 ---> Key.P
Keyboard.0014 ---> Key.Q
Keyboard.0015 ---> Key.R
Keyboard.0016 ---> Key.S
Keyboard.0017 ---> Key.T
Keyboard.0018 ---> Key.U
Keyboard.0019 ---> Key.V
Keyboard.001a ---> Key.W
Keyboard.001b ---> Key.X
Keyboard.001c ---> Key.Y
Keyboard.001d ---> Key.Z
Keyboard.001e ---> Key.1
Keyboard.001f ---> Key.2
Keyboard.0020 ---> Key.3
Keyboard.0021 ---> Key.4
Keyboard.0022 ---> Key.5
Keyboard.0023 ---> Key.6
Keyboard.0024 ---> Key.7
Keyboard.0025 ---> Key.8
Keyboard.0026 ---> Key.9
Keyboard.0027 ---> Key.0
Keyboard.0028 ---> Key.Enter
Keyboard.0029 ---> Key.Esc
Keyboard.002a ---> Key.Backspace
Keyboard.002b ---> Key.Tab
Keyboard.002c ---> Key.Space
Keyboard.002d ---> Key.Minus
Keyboard.002e ---> Key.Equal
Keyboard.002f ---> Key.LeftBrace
Keyboard.0030 ---> Key.RightBrace
Keyboard.0031 ---> Key.BackSlash
Keyboard.0032 ---> Key.BackSlash
Keyboard.0033 ---> Key.Semicolon
Keyboard.0034 ---> Key.Apostrophe
Keyboard.0035 ---> Key.Grave
Keyboard.0036 ---> Key.Comma
Keyboard.0037 ---> Key.Dot
Keyboard.0038 ---> Key.Slash
Keyboard.0039 ---> Key.CapsLock
Keyboard.003a ---> Key.F1
Keyboard.003b ---> Key.F2
Keyboard.003c ---> Key.F3
Keyboard.003d ---> Key.F4
Keyboard.003e ---> Key.F5
Keyboard.003f ---> Key.F6
Keyboard.0040 ---> Key.F7
Keyboard.0041 ---> Key.F8
Keyboard.0042 ---> Key.F9
Keyboard.0043 ---> Key.F10
Keyboard.0044 ---> Key.F11
Keyboard.0045 ---> Key.F12
Keyboard.0046 ---> Key.SysRq
Keyboard.0047 ---> Key.ScrollLock
Keyboard.0048 ---> Key.Pause
Keyboard.0049 ---> Key.Insert
Keyboard.004a ---> Key.Home
Keyboard.004b ---> Key.PageUp
Keyboard.004c ---> Key.Delete
Keyboard.004d ---> Key.End
Keyboard.004e ---> Key.PageDown
Keyboard.004f ---> Key.Right
Keyboard.0050 ---> Key.Left
Keyboard.0051 ---> Key.Down
Keyboard.0052 ---> Key.Up
Keyboard.0053 ---> Key.NumLock
Keyboard.0054 ---> Key.KPSlash
Keyboard.0055 ---> Key.KPAsterisk
Keyboard.0056 ---> Key.KPMinus
Keyboard.0057 ---> Key.KPPlus
Keyboard.0058 ---> Key.KPEnter
Keyboard.0059 ---> Key.KP1
Keyboard.005a ---> Key.KP2
Keyboard.005b ---> Key.KP3
Keyboard.005c ---> Key.KP4
Keyboard.005d ---> Key.KP5
Keyboard.005e ---> Key.KP6
Keyboard.005f ---> Key.KP7
Keyboard.0060 ---> Key.KP8
Keyboard.0061 ---> Key.KP9
Keyboard.0062 ---> Key.KP0
Keyboard.0063 ---> Key.KPDot
Keyboard.0064 ---> Key.102nd
Keyboard.0065 ---> Key.Compose
Keyboard.0066 ---> Key.Power
Keyboard.0067 ---> Key.KPEqual
Keyboard.0068 ---> Key.F13
Keyboard.0069 ---> Key.F14
Keyboard.006a ---> Key.F15
Keyboard.006b ---> Key.F16
Keyboard.006c ---> Key.F17
Keyboard.006d ---> Key.F18
Keyboard.006e ---> Key.F19
Keyboard.006f ---> Key.F20
Keyboard.0070 ---> Key.F21
Keyboard.0071 ---> Key.F22
Keyboard.0072 ---> Key.F23
Keyboard.0073 ---> Key.F24
Keyboard.0074 ---> Key.Open
Keyboard.0075 ---> Key.Help
Keyboard.0076 ---> Key.Props
Keyboard.0077 ---> Key.Front
Keyboard.0078 ---> Key.Stop
Keyboard.0079 ---> Key.Again
Keyboard.007a ---> Key.Undo
Keyboard.007b ---> Key.Cut
Keyboard.007c ---> Key.Copy
Keyboard.007d ---> Key.Paste
Keyboard.007e ---> Key.Find
Keyboard.007f ---> Key.Mute
Keyboard.0080 ---> Key.VolumeUp
Keyboard.0081 ---> Key.VolumeDown
Keyboard.0082 ---> Key.Unknown
Keyboard.0083 ---> Key.Unknown
Keyboard.0084 ---> Key.Unknown
Keyboard.0085 ---> Key.KPComma
Keyboard.0086 ---> Key.Unknown
Keyboard.0087 ---> Key.RO
Keyboard.0088 ---> Key.Katakana/Hiragana
Keyboard.0089 ---> Key.Yen
Keyboard.008a ---> Key.Henkan
Keyboard.008b ---> Key.Muhenkan
Keyboard.008c ---> Key.KPJpComma
Keyboard.008d ---> Key.Unknown
Keyboard.008e ---> Key.Unknown
Keyboard.008f ---> Key.Unknown
Keyboard.0090 ---> Key.Hangeul
Keyboard.0091 ---> Key.Hanja
LED.NumLock ---> LED.NumLock
LED.CapsLock ---> LED.CapsLock
LED.ScrollLock ---> LED.ScrollLock
LED.Compose ---> LED.Compose
LED.Kana ---> LED.Kana

And Apple aluminium:

# cat /sys/kernel/debug/hid/0003:05AC:0221.0001/rdesc
05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 01 05 08 19 01 29 05 95 05 75 01 91 02 95 01 75 03 91 01 05 07 19 00 2a ff 00 95 05 75 08 15 00 26 ff 00 81 00 05 ff 09 03 75 08 95 01 81 02 c0 

  INPUT[INPUT]
    Field(0)
      Usage(8)
        Keyboard.00e0
        Keyboard.00e1
        Keyboard.00e2
        Keyboard.00e3
        Keyboard.00e4
        Keyboard.00e5
        Keyboard.00e6
        Keyboard.00e7
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(8)
      Report Offset(0)
      Flags( Variable Absolute )
    Field(1)
      Usage(256)
        Keyboard.0000
        Keyboard.0001
        Keyboard.0002
        Keyboard.0003
        Keyboard.0004
        Keyboard.0005
        Keyboard.0006
        Keyboard.0007
        Keyboard.0008
        Keyboard.0009
        Keyboard.000a
        Keyboard.000b
        Keyboard.000c
        Keyboard.000d
        Keyboard.000e
        Keyboard.000f
        Keyboard.0010
        Keyboard.0011
        Keyboard.0012
        Keyboard.0013
        Keyboard.0014
        Keyboard.0015
        Keyboard.0016
        Keyboard.0017
        Keyboard.0018
        Keyboard.0019
        Keyboard.001a
        Keyboard.001b
        Keyboard.001c
        Keyboard.001d
        Keyboard.001e
        Keyboard.001f
        Keyboard.0020
        Keyboard.0021
        Keyboard.0022
        Keyboard.0023
        Keyboard.0024
        Keyboard.0025
        Keyboard.0026
        Keyboard.0027
        Keyboard.0028
        Keyboard.0029
        Keyboard.002a
        Keyboard.002b
        Keyboard.002c
        Keyboard.002d
        Keyboard.002e
        Keyboard.002f
        Keyboard.0030
        Keyboard.0031
        Keyboard.0032
        Keyboard.0033
        Keyboard.0034
        Keyboard.0035
        Keyboard.0036
        Keyboard.0037
        Keyboard.0038
        Keyboard.0039
        Keyboard.003a
        Keyboard.003b
        Keyboard.003c
        Keyboard.003d
        Keyboard.003e
        Keyboard.003f
        Keyboard.0040
        Keyboard.0041
        Keyboard.0042
        Keyboard.0043
        Keyboard.0044
        Keyboard.0045
        Keyboard.0046
        Keyboard.0047
        Keyboard.0048
        Keyboard.0049
        Keyboard.004a
        Keyboard.004b
        Keyboard.004c
        Keyboard.004d
        Keyboard.004e
        Keyboard.004f
        Keyboard.0050
        Keyboard.0051
        Keyboard.0052
        Keyboard.0053
        Keyboard.0054
        Keyboard.0055
        Keyboard.0056
        Keyboard.0057
        Keyboard.0058
        Keyboard.0059
        Keyboard.005a
        Keyboard.005b
        Keyboard.005c
        Keyboard.005d
        Keyboard.005e
        Keyboard.005f
        Keyboard.0060
        Keyboard.0061
        Keyboard.0062
        Keyboard.0063
        Keyboard.0064
        Keyboard.0065
        Keyboard.0066
        Keyboard.0067
        Keyboard.0068
        Keyboard.0069
        Keyboard.006a
        Keyboard.006b
        Keyboard.006c
        Keyboard.006d
        Keyboard.006e
        Keyboard.006f
        Keyboard.0070
        Keyboard.0071
        Keyboard.0072
        Keyboard.0073
        Keyboard.0074
        Keyboard.0075
        Keyboard.0076
        Keyboard.0077
        Keyboard.0078
        Keyboard.0079
        Keyboard.007a
        Keyboard.007b
        Keyboard.007c
        Keyboard.007d
        Keyboard.007e
        Keyboard.007f
        Keyboard.0080
        Keyboard.0081
        Keyboard.0082
        Keyboard.0083
        Keyboard.0084
        Keyboard.0085
        Keyboard.0086
        Keyboard.0087
        Keyboard.0088
        Keyboard.0089
        Keyboard.008a
        Keyboard.008b
        Keyboard.008c
        Keyboard.008d
        Keyboard.008e
        Keyboard.008f
        Keyboard.0090
        Keyboard.0091
        Keyboard.0092
        Keyboard.0093
        Keyboard.0094
        Keyboard.0095
        Keyboard.0096
        Keyboard.0097
        Keyboard.0098
        Keyboard.0099
        Keyboard.009a
        Keyboard.009b
        Keyboard.009c
        Keyboard.009d
        Keyboard.009e
        Keyboard.009f
        Keyboard.00a0
        Keyboard.00a1
        Keyboard.00a2
        Keyboard.00a3
        Keyboard.00a4
        Keyboard.00a5
        Keyboard.00a6
        Keyboard.00a7
        Keyboard.00a8
        Keyboard.00a9
        Keyboard.00aa
        Keyboard.00ab
        Keyboard.00ac
        Keyboard.00ad
        Keyboard.00ae
        Keyboard.00af
        Keyboard.00b0
        Keyboard.00b1
        Keyboard.00b2
        Keyboard.00b3
        Keyboard.00b4
        Keyboard.00b5
        Keyboard.00b6
        Keyboard.00b7
        Keyboard.00b8
        Keyboard.00b9
        Keyboard.00ba
        Keyboard.00bb
        Keyboard.00bc
        Keyboard.00bd
        Keyboard.00be
        Keyboard.00bf
        Keyboard.00c0
        Keyboard.00c1
        Keyboard.00c2
        Keyboard.00c3
        Keyboard.00c4
        Keyboard.00c5
        Keyboard.00c6
        Keyboard.00c7
        Keyboard.00c8
        Keyboard.00c9
        Keyboard.00ca
        Keyboard.00cb
        Keyboard.00cc
        Keyboard.00cd
        Keyboard.00ce
        Keyboard.00cf
        Keyboard.00d0
        Keyboard.00d1
        Keyboard.00d2
        Keyboard.00d3
        Keyboard.00d4
        Keyboard.00d5
        Keyboard.00d6
        Keyboard.00d7
        Keyboard.00d8
        Keyboard.00d9
        Keyboard.00da
        Keyboard.00db
        Keyboard.00dc
        Keyboard.00dd
        Keyboard.00de
        Keyboard.00df
        Keyboard.00e0
        Keyboard.00e1
        Keyboard.00e2
        Keyboard.00e3
        Keyboard.00e4
        Keyboard.00e5
        Keyboard.00e6
        Keyboard.00e7
        Keyboard.00e8
        Keyboard.00e9
        Keyboard.00ea
        Keyboard.00eb
        Keyboard.00ec
        Keyboard.00ed
        Keyboard.00ee
        Keyboard.00ef
        Keyboard.00f0
        Keyboard.00f1
        Keyboard.00f2
        Keyboard.00f3
        Keyboard.00f4
        Keyboard.00f5
        Keyboard.00f6
        Keyboard.00f7
        Keyboard.00f8
        Keyboard.00f9
        Keyboard.00fa
        Keyboard.00fb
        Keyboard.00fc
        Keyboard.00fd
        Keyboard.00fe
        Keyboard.00ff
      Logical Minimum(0)
      Logical Maximum(255)
      Report Size(8)
      Report Count(5)
      Report Offset(16)
      Flags( Array Absolute )
    Field(2)
      Usage(1)
        00ff.0003
      Logical Minimum(0)
      Logical Maximum(255)
      Report Size(8)
      Report Count(1)
      Report Offset(56)
      Flags( Variable Absolute )
  OUTPUT[OUTPUT]
    Field(0)
      Usage(5)
        LED.NumLock
        LED.CapsLock
        LED.ScrollLock
        LED.Compose
        LED.Kana
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(5)
      Report Offset(0)
      Flags( Variable Absolute )

Keyboard.00e0 ---> Key.LeftControl
Keyboard.00e1 ---> Key.LeftShift
Keyboard.00e2 ---> Key.LeftAlt
Keyboard.00e3 ---> Key.LeftMeta
Keyboard.00e4 ---> Key.RightCtrl
Keyboard.00e5 ---> Key.RightShift
Keyboard.00e6 ---> Key.RightAlt
Keyboard.00e7 ---> Key.RightMeta
Keyboard.0000 ---> Sync.Report
Keyboard.0001 ---> Sync.Report
Keyboard.0002 ---> Sync.Report
Keyboard.0003 ---> Sync.Report
Keyboard.0004 ---> Key.A
Keyboard.0005 ---> Key.B
Keyboard.0006 ---> Key.C
Keyboard.0007 ---> Key.D
Keyboard.0008 ---> Key.E
Keyboard.0009 ---> Key.F
Keyboard.000a ---> Key.G
Keyboard.000b ---> Key.H
Keyboard.000c ---> Key.I
Keyboard.000d ---> Key.J
Keyboard.000e ---> Key.K
Keyboard.000f ---> Key.L
Keyboard.0010 ---> Key.M
Keyboard.0011 ---> Key.N
Keyboard.0012 ---> Key.O
Keyboard.0013 ---> Key.P
Keyboard.0014 ---> Key.Q
Keyboard.0015 ---> Key.R
Keyboard.0016 ---> Key.S
Keyboard.0017 ---> Key.T
Keyboard.0018 ---> Key.U
Keyboard.0019 ---> Key.V
Keyboard.001a ---> Key.W
Keyboard.001b ---> Key.X
Keyboard.001c ---> Key.Y
Keyboard.001d ---> Key.Z
Keyboard.001e ---> Key.1
Keyboard.001f ---> Key.2
Keyboard.0020 ---> Key.3
Keyboard.0021 ---> Key.4
Keyboard.0022 ---> Key.5
Keyboard.0023 ---> Key.6
Keyboard.0024 ---> Key.7
Keyboard.0025 ---> Key.8
Keyboard.0026 ---> Key.9
Keyboard.0027 ---> Key.0
Keyboard.0028 ---> Key.Enter
Keyboard.0029 ---> Key.Esc
Keyboard.002a ---> Key.Backspace
Keyboard.002b ---> Key.Tab
Keyboard.002c ---> Key.Space
Keyboard.002d ---> Key.Minus
Keyboard.002e ---> Key.Equal
Keyboard.002f ---> Key.LeftBrace
Keyboard.0030 ---> Key.RightBrace
Keyboard.0031 ---> Key.BackSlash
Keyboard.0032 ---> Key.BackSlash
Keyboard.0033 ---> Key.Semicolon
Keyboard.0034 ---> Key.Apostrophe
Keyboard.0035 ---> Key.Grave
Keyboard.0036 ---> Key.Comma
Keyboard.0037 ---> Key.Dot
Keyboard.0038 ---> Key.Slash
Keyboard.0039 ---> Key.CapsLock
Keyboard.003a ---> Key.F1
Keyboard.003b ---> Key.F2
Keyboard.003c ---> Key.F3
Keyboard.003d ---> Key.F4
Keyboard.003e ---> Key.F5
Keyboard.003f ---> Key.F6
Keyboard.0040 ---> Key.F7
Keyboard.0041 ---> Key.F8
Keyboard.0042 ---> Key.F9
Keyboard.0043 ---> Key.F10
Keyboard.0044 ---> Key.F11
Keyboard.0045 ---> Key.F12
Keyboard.0046 ---> Key.SysRq
Keyboard.0047 ---> Key.ScrollLock
Keyboard.0048 ---> Key.Pause
Keyboard.0049 ---> Key.Insert
Keyboard.004a ---> Key.Home
Keyboard.004b ---> Key.PageUp
Keyboard.004c ---> Key.Delete
Keyboard.004d ---> Key.End
Keyboard.004e ---> Key.PageDown
Keyboard.004f ---> Key.Right
Keyboard.0050 ---> Key.Left
Keyboard.0051 ---> Key.Down
Keyboard.0052 ---> Key.Up
Keyboard.0053 ---> Key.NumLock
Keyboard.0054 ---> Key.KPSlash
Keyboard.0055 ---> Key.KPAsterisk
Keyboard.0056 ---> Key.KPMinus
Keyboard.0057 ---> Key.KPPlus
Keyboard.0058 ---> Key.KPEnter
Keyboard.0059 ---> Key.KP1
Keyboard.005a ---> Key.KP2
Keyboard.005b ---> Key.KP3
Keyboard.005c ---> Key.KP4
Keyboard.005d ---> Key.KP5
Keyboard.005e ---> Key.KP6
Keyboard.005f ---> Key.KP7
Keyboard.0060 ---> Key.KP8
Keyboard.0061 ---> Key.KP9
Keyboard.0062 ---> Key.KP0
Keyboard.0063 ---> Key.KPDot
Keyboard.0064 ---> Key.102nd
Keyboard.0065 ---> Key.Compose
Keyboard.0066 ---> Key.Power
Keyboard.0067 ---> Key.KPEqual
Keyboard.0068 ---> Key.F13
Keyboard.0069 ---> Key.F14
Keyboard.006a ---> Key.F15
Keyboard.006b ---> Key.F16
Keyboard.006c ---> Key.F17
Keyboard.006d ---> Key.F18
Keyboard.006e ---> Key.F19
Keyboard.006f ---> Key.F20
Keyboard.0070 ---> Key.F21
Keyboard.0071 ---> Key.F22
Keyboard.0072 ---> Key.F23
Keyboard.0073 ---> Key.F24
Keyboard.0074 ---> Key.Open
Keyboard.0075 ---> Key.Help
Keyboard.0076 ---> Key.Props
Keyboard.0077 ---> Key.Front
Keyboard.0078 ---> Key.Stop
Keyboard.0079 ---> Key.Again
Keyboard.007a ---> Key.Undo
Keyboard.007b ---> Key.Cut
Keyboard.007c ---> Key.Copy
Keyboard.007d ---> Key.Paste
Keyboard.007e ---> Key.Find
Keyboard.007f ---> Key.Mute
Keyboard.0080 ---> Key.VolumeUp
Keyboard.0081 ---> Key.VolumeDown
Keyboard.0082 ---> Key.Unknown
Keyboard.0083 ---> Key.Unknown
Keyboard.0084 ---> Key.Unknown
Keyboard.0085 ---> Key.KPComma
Keyboard.0086 ---> Key.Unknown
Keyboard.0087 ---> Key.RO
Keyboard.0088 ---> Key.Katakana/Hiragana
Keyboard.0089 ---> Key.Yen
Keyboard.008a ---> Key.Henkan
Keyboard.008b ---> Key.Muhenkan
Keyboard.008c ---> Key.KPJpComma
Keyboard.008d ---> Key.Unknown
Keyboard.008e ---> Key.Unknown
Keyboard.008f ---> Key.Unknown
Keyboard.0090 ---> Key.Hangeul
Keyboard.0091 ---> Key.Hanja
Keyboard.0092 ---> Key.Katakana
Keyboard.0093 ---> Key.HIRAGANA
Keyboard.0094 ---> Key.Zenkaku/Hankaku
Keyboard.0095 ---> Key.Unknown
Keyboard.0096 ---> Key.Unknown
Keyboard.0097 ---> Key.Unknown
Keyboard.0098 ---> Key.Unknown
Keyboard.0099 ---> Key.Unknown
Keyboard.009a ---> Key.Unknown
Keyboard.009b ---> Key.Unknown
Keyboard.009c ---> Key.Unknown
Keyboard.009d ---> Key.Unknown
Keyboard.009e ---> Key.Unknown
Keyboard.009f ---> Key.Unknown
Keyboard.00a0 ---> Key.Unknown
Keyboard.00a1 ---> Key.Unknown
Keyboard.00a2 ---> Key.Unknown
Keyboard.00a3 ---> Key.Unknown
Keyboard.00a4 ---> Key.Unknown
Keyboard.00a5 ---> Key.Unknown
Keyboard.00a6 ---> Key.Unknown
Keyboard.00a7 ---> Key.Unknown
Keyboard.00a8 ---> Key.Unknown
Keyboard.00a9 ---> Key.Unknown
Keyboard.00aa ---> Key.Unknown
Keyboard.00ab ---> Key.Unknown
Keyboard.00ac ---> Key.Unknown
Keyboard.00ad ---> Key.Unknown
Keyboard.00ae ---> Key.Unknown
Keyboard.00af ---> Key.Unknown
Keyboard.00b0 ---> Key.Unknown
Keyboard.00b1 ---> Key.Unknown
Keyboard.00b2 ---> Key.Unknown
Keyboard.00b3 ---> Key.Unknown
Keyboard.00b4 ---> Key.Unknown
Keyboard.00b5 ---> Key.Unknown
Keyboard.00b6 ---> Key.KPLeftParenthesis
Keyboard.00b7 ---> Key.KPRightParenthesis
Keyboard.00b8 ---> Key.Unknown
Keyboard.00b9 ---> Key.Unknown
Keyboard.00ba ---> Key.Unknown
Keyboard.00bb ---> Key.Unknown
Keyboard.00bc ---> Key.Unknown
Keyboard.00bd ---> Key.Unknown
Keyboard.00be ---> Key.Unknown
Keyboard.00bf ---> Key.Unknown
Keyboard.00c0 ---> Key.Unknown
Keyboard.00c1 ---> Key.Unknown
Keyboard.00c2 ---> Key.Unknown
Keyboard.00c3 ---> Key.Unknown
Keyboard.00c4 ---> Key.Unknown
Keyboard.00c5 ---> Key.Unknown
Keyboard.00c6 ---> Key.Unknown
Keyboard.00c7 ---> Key.Unknown
Keyboard.00c8 ---> Key.Unknown
Keyboard.00c9 ---> Key.Unknown
Keyboard.00ca ---> Key.Unknown
Keyboard.00cb ---> Key.Unknown
Keyboard.00cc ---> Key.Unknown
Keyboard.00cd ---> Key.Unknown
Keyboard.00ce ---> Key.Unknown
Keyboard.00cf ---> Key.Unknown
Keyboard.00d0 ---> Key.Unknown
Keyboard.00d1 ---> Key.Unknown
Keyboard.00d2 ---> Key.Unknown
Keyboard.00d3 ---> Key.Unknown
Keyboard.00d4 ---> Key.Unknown
Keyboard.00d5 ---> Key.Unknown
Keyboard.00d6 ---> Key.Unknown
Keyboard.00d7 ---> Key.Unknown
Keyboard.00d8 ---> Key.Unknown
Keyboard.00d9 ---> Key.Unknown
Keyboard.00da ---> Key.Unknown
Keyboard.00db ---> Key.Unknown
Keyboard.00dc ---> Key.Unknown
Keyboard.00dd ---> Key.Unknown
Keyboard.00de ---> Key.Unknown
Keyboard.00df ---> Key.Unknown
Keyboard.00e0 ---> Key.LeftControl
Keyboard.00e1 ---> Key.LeftShift
Keyboard.00e2 ---> Key.LeftAlt
Keyboard.00e3 ---> Key.LeftMeta
Keyboard.00e4 ---> Key.RightCtrl
Keyboard.00e5 ---> Key.RightShift
Keyboard.00e6 ---> Key.RightAlt
Keyboard.00e7 ---> Key.RightMeta
Keyboard.00e8 ---> Key.PlayPause
Keyboard.00e9 ---> Key.StopCD
Keyboard.00ea ---> Key.PreviousSong
Keyboard.00eb ---> Key.NextSong
Keyboard.00ec ---> Key.EjectCD
Keyboard.00ed ---> Key.VolumeUp
Keyboard.00ee ---> Key.VolumeDown
Keyboard.00ef ---> Key.Mute
Keyboard.00f0 ---> Key.WWW
Keyboard.00f1 ---> Key.Back
Keyboard.00f2 ---> Key.Forward
Keyboard.00f3 ---> Key.Stop
Keyboard.00f4 ---> Key.Find
Keyboard.00f5 ---> Key.ScrollUp
Keyboard.00f6 ---> Key.ScrollDown
Keyboard.00f7 ---> Key.Edit
Keyboard.00f8 ---> Key.Sleep
Keyboard.00f9 ---> Key.Coffee
Keyboard.00fa ---> Key.Refresh
Keyboard.00fb ---> Key.Calc
Keyboard.00fc ---> Key.Unknown
Keyboard.00fd ---> Key.Unknown
Keyboard.00fe ---> Key.Unknown
Keyboard.00ff ---> Key.Unknown
00ff.0003 ---> Key.Fn
LED.NumLock ---> LED.NumLock
LED.CapsLock ---> LED.CapsLock
LED.ScrollLock ---> LED.ScrollLock
LED.Compose ---> LED.Compose
LED.Kana ---> LED.Kana

... we see the Ortek's 'Logical Maximum' is incorrectly at 1, rather than 146; the apple keyboard has it set to 255.
Comment 4 jmharris 2010-01-11 23:23:55 UTC
Created attachment 24517 [details]
USB resource descriptor fix in new Ortek USB HID driver for Linux 2.6.32.3

Here is a patch for vanilla linux 2.6.32.3 sources. I have followed the pattern used for other quirky devices in the kernel, so you must enable the new Ortek USB HID driver available at:

-> Device Drivers
  -> HID Devices
    -> Special HID drivers

Please let me know if there is anything further required before this can be merged.
Comment 5 Dmitry Torokhov 2010-01-11 23:56:14 UTC
Your "Signed-off-by: " for the patch and the patch in unified diff form will be appreciated. Then it's up to Jiri to pick it up.
Comment 6 jmharris 2010-01-12 18:47:37 UTC
Created attachment 24523 [details]
USB resource descriptor fix in new Ortek USB HID driver for Linux 2.6.32.3 (unified diff)

Updated diff following guidelines in SubmittingPatches.

This patch adds a new USB HID driver for the Ortek WKB-2000, working around an incorrect LogicalMaximum value in the USB resource descriptor. Bug originally reported by Ubuntu users: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/405390

I have attempted to follow the same pattern as for similar buggy USB HID devices.

Signed-off-by: Johnathon Harris <jmharris@gmail.com>
Comment 7 Daniel J Blueman 2010-01-20 23:24:34 UTC
I have applied the patch against 2.6.33-rc4, built and tested; it works as expected - great work!

We should get this to Dmitry ASAP (if not already done) for a late pull request to Linus, for inclusion in 2.6.33-rc5, due in a week and CC stable@kernel.org in the patch email. The CC to stable will ensure it hits the 2.6.32 kernel series, which will be the baseline for Ubuntu 10.04 LTS (though it may move to 2.6.33).

Until then, we can simply use the updated mainline kernels:

http://kernel.ubuntu.com/~kernel-ppa/mainline/

(if you have Nvidia or Radeon graphics hardware, enabling the Xorg-edgers PPA will get you better graphics support). Thanks, JM! Here is my 'Tested-by' support for any patch email:

Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Comment 8 jmharris 2010-01-21 13:28:13 UTC
Thanks for taking the time to test this Daniel. Dmitry Torokhov commented earlier so I expect he's aware of the patch now being available in the required unified format.

Who should be ensuring stable@kernel.org is notified- or will this bug being tracked here suffice? I've not submitted a kernel patch before so I'm not familiar with the standard protocol.
Comment 9 Daniel J Blueman 2010-01-21 13:40:00 UTC
Hi Johnathon - one of us needs to present the patch in an email to Dmitry T (who's the kernel's input stack maintainer) and Jiri Kosina (USB keyboard maintainer), so they can handle it in the usual patch workflow.

The important thing is that you are acknowledged as developing the patch, and the chain of testers, which the maintainers upstream need from lack of hardware/time - are you happy I do this and get the patch off? We just CC the stable@kernel.org alias too.
Comment 10 jmharris 2010-01-21 13:45:29 UTC
Thanks for the guidance Daniel, I will present the patch as instructed.
Comment 11 Daniel J Blueman 2010-01-21 14:00:19 UTC
Great - from the MAINTAINERS file in the linux kernel:

USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
M:      Jiri Kosina <jkosina@suse.cz>
L:      linux-usb@vger.kernel.org

INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
M:      Dmitry Torokhov <dmitry.torokhov@gmail.com>   
L:      linux-input@vger.kernel.org

So, also you should CC linux-usb and linux-input.
Comment 12 jmharris 2010-01-21 14:40:39 UTC
Thanks Daniel, I've emailed the people and lists involved (although unfortunately Gmail mangled the first- fixed but apologies to those that see it).

Greg KH <greg () kroah ! com> had already replied to state that whole new drivers are not -stable material however.
Comment 13 Dmitry Torokhov 2010-01-21 18:09:16 UTC
The change touches drivers/hid so it should go through Jiri's tree and not mine. I see you have him in the patch submission e-mail so he should pick it up.
Comment 14 jmharris 2010-01-26 13:58:14 UTC
Jiri Kosina reports he has applied this patch.
Comment 15 ken 2010-02-07 14:44:50 UTC
I am very new to compiling my own kernel.  I am/was using Ubuntu Karmic (9.10) and installed KernelCheck.  From there I installed the 2.6.32.3 kernel and applied the patch as provided by jharris above.  I then had to install the nvidia drivers.  After a few attempts I was able to boot using the new kernel with the nvidia drivers.

The problem I am having is that some of the Ortek keys are being incorrectly recognised.  They all appear to be recognised but not correctly. For instance, j, k, and l are being seen as 1, 2, and 3.  However the rest of the row (a,s,d,f,g,h) are all recognised correctly.  

I am not sure if this is related to this bug report.
Is there anything I should try which might be of help to this bug report?
Comment 16 Marc Warne 2010-02-07 14:59:56 UTC
ken: Although I haven't tried it myself, it's probably because you have Num Lock on. This replaces the functions of keys around the j, k, l region and maps these to the numeric keypad.

Try turning this off to see whether you have the same issue.
Comment 17 ken 2010-02-07 17:00:38 UTC
Hi Marc,

You are correct. Thanks so much.

To summarise: I have installed the 2.6.32.3 kernel using KernelCheck on Ubuntu (with nvidia drivers) and applied the patch.  The keyboard appears to work correctly for me.
Comment 18 ale.forums 2010-02-27 18:14:55 UTC
Has the patch been applied to the upstream kernel?
I cannot find the config for the ortek keyboard available in the special HID devices when compiling kernel version 2.6.33 from opensuse
Comment 19 jmharris 2010-03-02 18:01:12 UTC
(In reply to comment #18)
> Has the patch been applied to the upstream kernel?
> I cannot find the config for the ortek keyboard available in the special HID
> devices when compiling kernel version 2.6.33 from opensuse

It's in the 2.6.33-git7 patches at the time of writing, so expect 2.6.34 to have it if you're waiting for a full release. Ubuntu have released a kernel package for 2.6.32 with this patch already applied.
Comment 20 ale.forums 2010-03-03 21:54:48 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > Has the patch been applied to the upstream kernel?
> > I cannot find the config for the ortek keyboard available in the special
> HID
> > devices when compiling kernel version 2.6.33 from opensuse
> 
> It's in the 2.6.33-git7 patches at the time of writing, so expect 2.6.34 to
> have it if you're waiting for a full release. Ubuntu have released a kernel
> package for 2.6.32 with this patch already applied.

Thanks! 

However I have been a little impatient and patched the sources for the version 2.6.31 and 2.6.33 of the opensuse desktop kernel, and in both cases the keyboard works perfectly.

In the first case the kernel version is the same as the official one and so all of the packages from the distro link with it perfectly.

In the second case I was unable to install the official drivers for my nvidia card.

Thank you very much to the coder that did the patch, it works great!
Comment 21 ale.forums 2010-03-22 21:31:15 UTC
It looks like that the touchpad included in the keyboard is a synaptics one

# tpconfig -r 1
Found Synaptics Touchpad.
Firmware: 8.96 (multiple-byte mode).
Packets: absolute, 80 packets per second.

This touchpad should be capable of multitouch operation.
As the windows driver can allow it and as multitouch should be possible in at least two ways as described in this webpage:

http://blog.twinapex.fi/2009/10/11/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook/

However the xserver is not picking it up as a synaptics touchpad, in fact
even after trying both methods I get the following result:

# xinput list
"Virtual core pointer"  id=0    [XPointer]             
        Num_buttons is 32                              
        Num_axes is 2                                  
        Mode is Relative                               
        Motion_buffer is 256                           
        Axis 0 :                                       
                Min_value is -1                        
                Max_value is -1                        
                Resolution is 0                        
        Axis 1 :                                       
                Min_value is -1                        
                Max_value is -1                        
                Resolution is 0                        
"Virtual core keyboard" id=1    [XKeyboard]            
        Num_keys is 248                                
        Min_keycode is 8                               
        Max_keycode is 255                             
"ORTEK Smartpad Keyboard"       id=2    [XExtensionKeyboard]
        Type is KEYBOARD                                    
        Num_keys is 248                                     
        Min_keycode is 8                                    
        Max_keycode is 255                                  
        Num_buttons is 13                                   
        Num_axes is 2                                       
        Mode is Relative                                    
        Motion_buffer is 256                                
        Axis 0 :                                            
                Min_value is -1                             
                Max_value is -1                             
                Resolution is 1                             
        Axis 1 :                                            
                Min_value is -1                             
                Max_value is -1                             
                Resolution is 1                             
"Power Button"  id=3    [XExtensionKeyboard]                
        Type is KEYBOARD                                    
        Num_keys is 248                                     
        Min_keycode is 8                                    
        Max_keycode is 255                                  
"Power Button"  id=4    [XExtensionKeyboard]                
        Type is KEYBOARD                                    
        Num_keys is 248
        Min_keycode is 8
        Max_keycode is 255
"ORTEK Smartpad Keyboard"       id=5    [XExtensionKeyboard]
        Type is KEYBOARD
        Num_keys is 248
        Min_keycode is 8
        Max_keycode is 255
"Macintosh mouse button emulation"      id=6    [XExtensionPointer]
        Type is MOUSE
        Num_buttons is 5
        Num_axes is 2
        Mode is Relative
        Motion_buffer is 256
        Axis 0 :
                Min_value is -1
                Max_value is -1
                Resolution is 1
        Axis 1 :
                Min_value is -1
                Max_value is -1
                Resolution is 1

not to mention that at the command

# synclient -l

i get the following response

Couldn't find synaptics properties. No synaptics driver loaded?

However in my xorg.conf file I have set it up as such

Section "InputDevice"
Driver "synaptics"
Identifier "Mouse[0]"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons" "true"
Option "Name" "Touchpad"
Option "SHMConfig" "true"
Option "Vendor" "Synaptics"
Option "ZAxisMapping" "4 5"
EndSection

and I can also get the following readout

# tpconfig -d /dev/input/mice
Found Synaptics Touchpad.
Firmware: 8.96 (multiple-byte mode).

Is the code of the patch maybe incomplete so that the touchpad cannot be detected properly as such by the Xserver thus preventing multitouch from being enabled?

If I give the command

$ synclient -m 100

then I get

Can't access shared memory area. SHMConfig disabled?

go figure.

I am using ubuntu 9.10 with a patched 2.6.31.9 kernel
Comment 22 Dmitry Torokhov 2010-03-22 21:55:43 UTC
NO! Please remove tpconfig utility from your system and forget about it. It hasn't been working for many years (pull the keyboard and all your mice out and it still will report that you have synaptics present).
Comment 23 Rob Davis 2010-08-13 12:23:46 UTC
Can you add:

Bus 001 Device 011: ID 05a4:1700 Ortek Technology, Inc.

To the ortek driver.   I patched my linux source and it works with your driver. (For testing I changed the USB ID you have above to 05a4:1700 with good results, but would like it to go upstream, probably in a way that both devices can work). It's the tiny keyboard they're now doing, the pkd-1700. I guess it's the same chipset as above.

It's for this hardware:

http://www.ortek.com/prod_detail.asp?id=164&pid=131&ppid=101&cname=Keyboard%3E%3EWireless%20Keyboard%3E%3EPKB-1700
Comment 24 jmharris 2010-09-30 20:26:53 UTC
Hi Rob, thanks for confirming that. I've had mail from a couple of others with that model and it seems to have the same (or a similar) problem.

Before we submit a patch I would like to check that the PKB-1700 USB resource descriptor has the same problem, rather than just assume it does (although as it works for you, it is likely to be). Since the patch rewrites the LogicalMaximum value it would be best to check it is definitely set correctly for both models. Is it possible for you to enable debug and send me the rdesc? (As Danial did in
comment #3).

I also suspect this would be best handled by opening a new bug with the corresponding patch, if anyone cares to correct me on that assumption.
Comment 25 Johan 2011-01-07 11:45:04 UTC
Another bug has been opened regarding this issue, with a corresponding patch.

https://bugzilla.kernel.org/show_bug.cgi?id=24672

Note You need to log in before you can comment on or make changes to this bug.