From 51305e0a21c80e0929a305368e9c94785e4cf255 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 25 May 2013 18:35:55 +0200 Subject: [PATCH 1/3] solaar-cli: fix regression in argument parsing When no hidraw device is given, `solaar-cli` crashes because `None` is being indirected. Use the correct action (`store`) to avoid indirecting a list. --- lib/solaar/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/solaar/cli.py b/lib/solaar/cli.py index 4b96cf0a..391f0762 100644 --- a/lib/solaar/cli.py +++ b/lib/solaar/cli.py @@ -338,7 +338,7 @@ def _parse_arguments(): arg_parser.add_argument('-d', '--debug', action='count', default=0, help='print logging messages, for debugging purposes (may be repeated for extra verbosity)') arg_parser.add_argument('-V', '--version', action='version', version='%(prog)s ' + __version__) - arg_parser.add_argument('-D', '--hidraw', nargs=1, dest='hidraw_path', metavar='PATH', + arg_parser.add_argument('-D', '--hidraw', action='store', dest='hidraw_path', metavar='PATH', help='unifying receiver to use; the first detected receiver if unspecified. Example: /dev/hidraw2') subparsers = arg_parser.add_subparsers(title='commands') @@ -395,7 +395,7 @@ def _parse_arguments(): def main(): _require('pyudev', 'python-pyudev') args = _parse_arguments() - receiver = _receiver(args.hidraw_path[0] if args.hidraw_path else None) + receiver = _receiver(args.hidraw_path) args.cmd(receiver, args) if __name__ == '__main__': From 4a7be89be602a328e893fda0b23a3da303616637 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 26 May 2013 20:58:53 +0200 Subject: [PATCH 2/3] devices.md: add reprog keys to feature list, K360 --- docs/devices.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/devices.md b/docs/devices.md index 0438e30c..fb63c745 100644 --- a/docs/devices.md +++ b/docs/devices.md @@ -50,6 +50,10 @@ level. For mice, the DPI column specifies if the mouse's sensitivity is fixed (-), can only be read (R), or can be read and changed by Solaar (R/W). +The reprog(rammable) keys feature is currently not fully supported by Solaar. +You are able to read this feature using solaar-cli, but it is not possible to +assign different keys. + Keyboards: @@ -59,10 +63,10 @@ Keyboards: | K270 | | | | | K340 | | | | | K350 | | | | -| K360 | | | | +| K360 | 2.0 | yes | FN swap, reprog keys | | K400 Touch | 2.0 | yes | | | K750 Solar | 2.0 | yes | FN swap, Lux reading, light button | -| K800 Illuminated | 1.0 | yes | FN swap | +| K800 Illuminated | 1.0 | yes | FN swap, reprog keys | Mice: From 410c19dd7897e35db84c6faad21b6108e375834f Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 26 May 2013 21:02:08 +0200 Subject: [PATCH 3/3] devices/k360: ltunify+solaar-cli output of k360+receiver --- docs/devices/k360.txt | 88 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 docs/devices/k360.txt diff --git a/docs/devices/k360.txt b/docs/devices/k360.txt new file mode 100644 index 00000000..abf8ce48 --- /dev/null +++ b/docs/devices/k360.txt @@ -0,0 +1,88 @@ +Receiver +LZ22175-DJ +M/N:C-U0007 +(ltunify) +Serial number: 0353B192 +Firmware version: 012.001.00019 +Bootloader version: BL.002.014 +(solaar-cli) +-: Unifying Receiver + Device path : /dev/hidraw2 + Serial : 53B19204 + Firmware : 12.01.B0019 + Bootloader : 02.14 + Has 1 paired device(s) out of a maximum of 6 + Enabled notifications: 0x000900 = wireless, software present. + +Keyboard +K360 +P/N: 820-003472 +S/N: 1223CE0521E8 +M/N: Y-R0017 +(ltunify) +HID++ version: 2.0 +Device index 1 +Keyboard +Name: K360 +Wireless Product ID: 4004 +Serial number: 60BA944E +Device was unavailable, version information not available. +Total number of HID++ 2.0 features: 12 + 0: [0000] IRoot + 1: [0001] IFeatureSet + 2: [0003] IFirmwareInfo + 3: [0005] GetDeviceNameType + 4: [1000] batteryLevelStatus + 5: [1820] H unknown + 6: [1B00] SpecialKeysMSEButtons + 7: [1D4B] WirelessDeviceStatus + 8: [1DF0] H unknown + 9: [1DF3] H unknown + 10: [40A0] FnInversion + 11: [4100] Encryption + 12: [4520] KeyboardLayout +(O = obsolete feature; H = SW hidden feature) +(solaar-cli) +1: Wireless Keyboard K360 + Codename : K360 + Kind : keyboard + Protocol : HID++ 2.0 + Polling rate : 20 ms + Wireless PID : 4004 + Serial number: 60BA944E + Firmware : RQK 36.00.B0007 + The power switch is located on the top case + Supports 13 HID++ 2.0 features: + 0: ROOT {0000} + 1: FEATURE SET {0001} + 2: FIRMWARE {0003} + 3: NAME {0005} + 4: BATTERY {1000} + 5: unknown:1820 {1820} hidden + 6: REPROGRAMMABLE KEYS {1B00} + 7: WIRELESS {1D4B} + 8: unknown:1DF0 {1DF0} hidden + 9: unknown:1DF3 {1DF3} hidden + 10: FN STATUS {40A0} + 11: unknown:4100 {4100} + 12: unknown:4520 {4520} + Has 18 reprogrammable keys: + 0: unknown: 22 34 => Home FN sensitive, is FN, reprogrammable (F1) + 1: Mail E 14 => Mail FN sensitive, is FN, reprogrammable (...) + 2: unknown: 3E 62 => Search FN sensitive, is FN, reprogrammable + 3: unknown: 28 40 => Music FN sensitive, is FN, reprogrammable + 4: Applica 8 8 => Application Switcher FN sensitive, is FN, reprogrammable Alt+Tab + 5: unknown: 6E 110 => unknown:0043 FN sensitive, is FN, reprogrammable Win+D ("Show desktop") + 6: unknown: 27 39 => unknown:001C FN sensitive, is FN, reprogrammable Win+M ("Minimize") + 7: unknown: 25 37 => unknown:001B FN sensitive, is FN, reprogrammable Win+Shift+M ("Restore windows") + 8: unknown: 33 51 => unknown:0027 FN sensitive, is FN, reprogrammable Win+E ("My Computer") + 9: unknown: 6F 111 => unknown:0044 FN sensitive, is FN, reprogrammable Win+L ("Lock") + 10: unknown: 40 64 => Sleep FN sensitive, is FN, reprogrammable + 11: Calcul A 10 => Calculator FN sensitive, is FN, reprogrammable (F12) + 12: Previou 6 6 => Previous nonstandard + 13: Play/P 4 4 => Play/Pause nonstandard + 14: Next 5 5 => Next nonstandard + 15: Mute 3 3 => Mute nonstandard + 16: Volume D 2 2 => Volume Down nonstandard + 17: Volume Up 1 1 => Volume Up nonstandard + Battery is 90% charged, dischargin