All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v2] keymap: add Genius SlimStar 320
@ 2011-08-23 11:17 Kir Kolyshkin
  2011-08-23 11:26 ` Kir Kolyshkin
  0 siblings, 1 reply; 2+ messages in thread
From: Kir Kolyshkin @ 2011-08-23 11:17 UTC (permalink / raw)
  To: linux-hotplug

This keyboard have 16 "multimedia" keys plus a "4-way turbo scroll pad" which
is essentially a round up/down/left/right button. Unfortunately most of
these keys emit non-standard scancodes in a range 495-508 which does not
make any sense. I tried to remap those to the best of my knowledge.

Note the keyboard comes up as two event devices, second one is multimedia
keys, so I ended up adding ENV{ID_USB_INTERFACE_NUM}="01" to avoid
unnecessary initialization of the "main" keyboard.

[v2: add a new keymap file to Makefile.am]

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
---
 Makefile.am                               |    1 +
 extras/keymap/95-keymap.rules             |    1 +
 extras/keymap/keymaps/genius-slimstar-320 |   35 +++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 0 deletions(-)
 create mode 100644 extras/keymap/keymaps/genius-slimstar-320

diff --git a/Makefile.am b/Makefile.am
index 5347569..da9574c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -496,6 +496,7 @@ dist_udevkeymap_DATA = \
 	extras/keymap/keymaps/fujitsu-amilo_si_1520 \
 	extras/keymap/keymaps/fujitsu-esprimo_mobile_v5 \
 	extras/keymap/keymaps/fujitsu-esprimo_mobile_v6 \
+	extras/keymap/keymaps/genius-slimstar-320 \
 	extras/keymap/keymaps/hewlett-packard \
 	extras/keymap/keymaps/hewlett-packard-2510p_2530p \
 	extras/keymap/keymaps/hewlett-packard-compaq_elitebook \
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index 0d9b771..0742787 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -20,6 +20,7 @@ GOTO="keyboard_modulecheck"
 
 LABEL="keyboard_usbcheck"
 
+ENV{ID_VENDOR}="Genius", ENV{ID_MODEL_ID}="0708", ENV{ID_USB_INTERFACE_NUM}="01", RUN+="keymap $name genius-slimstar-320"
 ENV{ID_VENDOR}="Logitech*", ATTRS{name}="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
 ENV{ID_VENDOR}="Logitech*", ATTRS{name}="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless"
 # Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface
diff --git a/extras/keymap/keymaps/genius-slimstar-320 b/extras/keymap/keymaps/genius-slimstar-320
new file mode 100644
index 0000000..d0a3656
--- /dev/null
+++ b/extras/keymap/keymaps/genius-slimstar-320
@@ -0,0 +1,35 @@
+# Genius SlimStar 320
+#
+# Only buttons which are not properly mapped yet are configured below
+
+# "Scroll wheel", a circular up/down/left/right button. Aimed for scolling,
+# but since there are no scrollleft/scrollright, let's map to back/forward.
+0x900f0 scrollup
+0x900f1 scrolldown
+0x900f3 back
+0x900f2 forward
+
+# Multimedia buttons, left side (from left to right)
+# [W]
+0x900f5 wordprocessor
+# [Ex]
+0x900f6 spreadsheet
+# [P]
+0x900f4 presentation
+# Other five (calculator, playpause, stop, mute and eject) are OK
+
+# Right side, from left to right
+# [e]
+0xc0223 www
+# "man"
+0x900f7 chat
+# "Y"
+0x900fb prog1
+# [X]
+0x900f8 close
+# "picture"
+0x900f9 graphicseditor
+# "two windows"
+0x900fd scale
+# "lock"
+0x900fc screenlock
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [v2] keymap: add Genius SlimStar 320
  2011-08-23 11:17 [PATCH] [v2] keymap: add Genius SlimStar 320 Kir Kolyshkin
@ 2011-08-23 11:26 ` Kir Kolyshkin
  0 siblings, 0 replies; 2+ messages in thread
From: Kir Kolyshkin @ 2011-08-23 11:26 UTC (permalink / raw)
  To: linux-hotplug

Please pardon the noise and ignore this one (use the 'addon' instead, 
sent separately).

On 08/23/2011 03:17 PM, Kir Kolyshkin wrote:
> This keyboard have 16 "multimedia" keys plus a "4-way turbo scroll pad" which
> is essentially a round up/down/left/right button. Unfortunately most of
> these keys emit non-standard scancodes in a range 495-508 which does not
> make any sense. I tried to remap those to the best of my knowledge.
>
> Note the keyboard comes up as two event devices, second one is multimedia
> keys, so I ended up adding ENV{ID_USB_INTERFACE_NUM}="01" to avoid
> unnecessary initialization of the "main" keyboard.
>
> [v2: add a new keymap file to Makefile.am]
>
> Signed-off-by: Kir Kolyshkin<kir@openvz.org>
> ---
>   Makefile.am                               |    1 +
>   extras/keymap/95-keymap.rules             |    1 +
>   extras/keymap/keymaps/genius-slimstar-320 |   35 +++++++++++++++++++++++++++++
>   3 files changed, 37 insertions(+), 0 deletions(-)
>   create mode 100644 extras/keymap/keymaps/genius-slimstar-320
>
> diff --git a/Makefile.am b/Makefile.am
> index 5347569..da9574c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -496,6 +496,7 @@ dist_udevkeymap_DATA = \
>   	extras/keymap/keymaps/fujitsu-amilo_si_1520 \
>   	extras/keymap/keymaps/fujitsu-esprimo_mobile_v5 \
>   	extras/keymap/keymaps/fujitsu-esprimo_mobile_v6 \
> +	extras/keymap/keymaps/genius-slimstar-320 \
>   	extras/keymap/keymaps/hewlett-packard \
>   	extras/keymap/keymaps/hewlett-packard-2510p_2530p \
>   	extras/keymap/keymaps/hewlett-packard-compaq_elitebook \
> diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
> index 0d9b771..0742787 100644
> --- a/extras/keymap/95-keymap.rules
> +++ b/extras/keymap/95-keymap.rules
> @@ -20,6 +20,7 @@ GOTO="keyboard_modulecheck"
>
>   LABEL="keyboard_usbcheck"
>
> +ENV{ID_VENDOR}="Genius", ENV{ID_MODEL_ID}="0708", ENV{ID_USB_INTERFACE_NUM}="01", RUN+="keymap $name genius-slimstar-320"
>   ENV{ID_VENDOR}="Logitech*", ATTRS{name}="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
>   ENV{ID_VENDOR}="Logitech*", ATTRS{name}="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless"
>   # Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface
> diff --git a/extras/keymap/keymaps/genius-slimstar-320 b/extras/keymap/keymaps/genius-slimstar-320
> new file mode 100644
> index 0000000..d0a3656
> --- /dev/null
> +++ b/extras/keymap/keymaps/genius-slimstar-320
> @@ -0,0 +1,35 @@
> +# Genius SlimStar 320
> +#
> +# Only buttons which are not properly mapped yet are configured below
> +
> +# "Scroll wheel", a circular up/down/left/right button. Aimed for scolling,
> +# but since there are no scrollleft/scrollright, let's map to back/forward.
> +0x900f0 scrollup
> +0x900f1 scrolldown
> +0x900f3 back
> +0x900f2 forward
> +
> +# Multimedia buttons, left side (from left to right)
> +# [W]
> +0x900f5 wordprocessor
> +# [Ex]
> +0x900f6 spreadsheet
> +# [P]
> +0x900f4 presentation
> +# Other five (calculator, playpause, stop, mute and eject) are OK
> +
> +# Right side, from left to right
> +# [e]
> +0xc0223 www
> +# "man"
> +0x900f7 chat
> +# "Y"
> +0x900fb prog1
> +# [X]
> +0x900f8 close
> +# "picture"
> +0x900f9 graphicseditor
> +# "two windows"
> +0x900fd scale
> +# "lock"
> +0x900fc screenlock


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-23 11:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 11:17 [PATCH] [v2] keymap: add Genius SlimStar 320 Kir Kolyshkin
2011-08-23 11:26 ` Kir Kolyshkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.