Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[MINI-HOWTO] Make ViewMate kp202 work in Linux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
blaster999
l33t
l33t


Joined: 09 May 2004
Posts: 902
Location: Between keyboard and chair

PostPosted: Mon Dec 20, 2004 7:23 am    Post subject: [MINI-HOWTO] Make ViewMate kp202 work in Linux Reply with quote

Make all of the ViewMate extra keys work in Linux

This is a mini-howto for those who have a ViewMate
keyboard (and, probably, other multimedia keyboards with lots of additional keys).

I bought a ViewSonic ViewMate Office Keyboard kp202 yesterday. It has many additional keys (like Copy, Paste Calc and so on). You can have a look at it here: http://www.viewsonic.com/products/accessories/keyboards/kbmkp202/

So, I needed to make all those funky keys work. First, I launched xev and pressed all the keys. Every key (except the strange arrows to the left) produced some output. Not bad. Now I searched for this keyboard model in Xorg symbol files. It was not mentioned, so I had to configure it myself. This isn't too difficult. Launch your favourite text editor (as root) and open the file /usr/X11R6/lib/X11/xkb/symbols/inet (it contains the symbol definition for Internet and Multimedia keyboards). The keyboard that was the most similar to mine was MS Natural Keyboard, so I just copied its config:
Code:

partial alphanumeric_keys
xkb_symbols "microsoftpro" {
    name[Group1]= "Microsoft Natural Keyboard Pro / Microsoft Internet Keyboard Pro";

//   Multimedia Section -- Right Side
    key <I22>   {       [ XF86AudioPlay, XF86AudioPause ] };
    key <I10>   {       [ XF86AudioPrev         ]       };
    key <I24>   {       [ XF86AudioStop         ]       };
    key <I19>   {       [ XF86AudioNext         ]       };
    key <I6D>   {       [ XF86AudioMedia        ]       };
    key <I2E>   {       [ XF86AudioLowerVolume  ]       };
    key <I30>   {       [ XF86AudioRaiseVolume  ]       };
    key <I20>   {       [ XF86AudioMute         ]       };
//   Internet Section -- Left Side
    key <I32>   {       [ XF86HomePage          ]       };
    key <I6C>   {       [ XF86Mail              ]       };
    key <I66>   {       [ XF86Favorites         ]       };
    key <I65>   {       [ XF86Search            ]       };
    key <I68>   {       [ XF86Stop              ]       };
    key <I6A>   {       [ XF86Back              ]       };
    key <I69>   {       [ XF86Forward           ]       };
    key <I67>   {       [ XF86Reload            ]       };
//   My Computer Section -- Far Right
    key <I6B>   {       [ XF86MyComputer        ]       };
    key <I21>   {       [ XF86Calculator        ]       };
    key <I5F>   {       [ XF86Standby           ]       };
};

and changed the xkb_symbols to "viewmate" and name to "ViewSonic ViewMate Office Keyboard". Then I searched for the keys that are present on my keyboard but are not on MS natural keyboard, such as Standby, PowerOff, calendar and so on. That's what I got at the end:
Code:
//ViewSonic

partial alphanumeric_keys
xkb_symbols "viewmate" {
    name[Group1]= "ViewSonic ViewMate Office Keyboard";

    key <I22>   {       [ XF86AudioPlay, XF86AudioPause ] };
    key <I10>   {       [ XF86AudioPrev         ]       };
    key <I24>   {       [ XF86AudioStop         ]       };
    key <I19>   {       [ XF86AudioNext         ]       };
    key <I6D>   {       [ XF86AudioMedia        ]       };
    key <I2E>   {       [ XF86AudioLowerVolume  ]       };
    key <I30>   {       [ XF86AudioRaiseVolume  ]       };
    key <I20>   {       [ XF86AudioMute         ]       };
    key <I32>   {       [ XF86HomePage          ]       };
    key <I6C>   {       [ XF86Mail              ]       };
    key <I66>   {       [ XF86Favorites         ]       };
    key <I65>   {       [ XF86Search            ]       };
    key <I68>   {       [ XF86Stop              ]       };
    key <I6A>   {       [ XF86Back              ]       };
    key <I69>   {       [ XF86Forward           ]       };
    key <I67>   {       [ XF86Reload            ]       };
    key <I6B>   {       [ XF86MyComputer        ]       };
    key <I21>   {       [ XF86Calculator        ]       };
    key <I5F>   {       [ XF86Standby           ]       };
    key <BRK>   {       [ XF86Calendar          ]       };
    key <I63>   {       [ XF86Standby           ]       };
    key <I5E>   {       [ XF86PowerOff          ]       };
    key <I4A>   {       [ XF86LogOff            ]       };
    key <I5F>   {       [ XF86Sleep             ]       };

};


The job isn't finished yet. I had to edit /usr/X11R6/lib/X11/xkb/rules/xorg, locate the section
Code:

! $inetkbds = airkey acpi scorpius azonaRF2300 \
              brother \
              btc5113rf btc5126t btc9000 btc9000a btc9001ah btc5090\
              cherryblue cherrybluea \
              chicony chicony9885 \
              compaqeak8 compaqik7 compaqik13 compaqik18 armada presario ipaq \
              dell inspiron dtk2000 \
              dexxa diamond genius geniuscomfy2 \
              ennyah_dkb1008 \
              hpi6 hp2501 hp2505 hp5181 hpxe3gc hpxe3gf hpxe4xxx hpzt11xx \
              hp500fa hp5xx hp5185 \
              honeywell_euroboard \
              rapidaccess rapidaccess2 rapidaccess2a \
              ltcd logiaccess logicdp logicdpa logicink logiciink \
              logiinkse logiinkseusb logiik itouch \
              mx1998 mx2500 mx2750 \
              microsoftinet microsoftpro microsoftprooem microsoftprose \
              microsoftoffice microsoftmult \
              oretec \
              propeller \
              qtronix \
              samsung4500 samsung4510 \
              sk1300 sk2500 sk6200 sk7100 \
              sven symplon toshiba_s3000 trust trustda yahoo

and add "viewmate" somwhere in the middle. After that, I edited /usr/X11R6/lib/X11/xkb/rules/xorg.lst and added "viewmate ViewSonic ViewMate Office Keyboard" in the !model section and added the following code to /usr/X11R6/lib/X11/xkb/rules/xorg.xml:
Code:

    <model>
      <configItem>
        <name>viewmate</name>
        <description>ViewSonic ViewMate Office Keyboard</description>
      </configItem>
    </model>

The last step I did: I edited my xorg.conf and changed Option "XkbModel" to "viewmate".
Restart the X.
Now the keys can be bound to anything. I use KDE, so I launch the KontrolCenter and go straight to Regional & Accessibility -> Keyboard shortcuts (or KHotKeys if you need some special actions bound to your keys). BTW, Konqueror didn't use the Back, Forward and Stop buttons by default, so I had to manually set the shortcuts by going to Tools -> Configure shortcuts in konqueror.

Now what I did to make the multimedia keys (play, stop, next song, prev song, etc) work in xmms:
I've emerged xmms-itouch, launched xmms, entered config dialog, configured the itouch plugin (configured the needed keys), then exited xmms and edited the ~/.xmms/config (deleted all keys from section iTouch except:
vol_increment=8
vol_decrement=8
play=162
stop=164
prev_track=144
next_track=153
). This is imortant - or xmms will crash! Then I re-run xmms, enabled the itouch plugin - and the keys work like a charm.

TODO:
Power Off button still doesn't work
LogOff is recognized as "return"
I need to figure out what exactly is the strange round key with arrows.
_________________
60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
http://forums.gentoo.org/viewtopic.php?p=1896734#1896734
Back to top
View user's profile Send private message
yofreaksharma
n00b
n00b


Joined: 27 Sep 2004
Posts: 9
Location: orlando

PostPosted: Fri Jul 14, 2006 9:29 pm    Post subject: xev not registering keystrokes Reply with quote

can you post the keyboard section of your xorg.conf file? because when i try to hit the other keys on the keyboard xev doesnt register anything.
Back to top
View user's profile Send private message
blaster999
l33t
l33t


Joined: 09 May 2004
Posts: 902
Location: Between keyboard and chair

PostPosted: Sat Jul 15, 2006 5:57 am    Post subject: Reply with quote

If xev doesn't register keys, it means that the key doesn't have a keycode assigned. Press the key and see the tail of dmesg. You'll see something like:

Quote:

atkbd.c: Unknown key pressed (translated set 2, code 0x8b on isa0060/serio0).
atkbd.c: Use 'setkeycodes e00b <keycode>' to make it known.


So, you'll have to do exactly as it says, substituting <keycode> with an unused keycode (you might add the command to your local.start).
_________________
60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
http://forums.gentoo.org/viewtopic.php?p=1896734#1896734
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum