Zboard MERC
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Contents |
[edit] Introduction
This guide aims to show you how to configure your Zboard MERC to work as expected in X11. Although there are no drivers for the keyboard, we will be using some xmodmap configurations to get it working and functional. ALSO NOTE: I recently created a program that should manage the keyboard for you, it hasn't been through much testing but it provides more functionality then just xModMap and is currently the recommened approch. To download click here (at time of writing this, the latest version is 0.1.1).
[edit] Preparing xmodmap
We need to create a file with the xmodmap configuration for our keyboard, your home directory is a good place. Run the following command to create an empty file:
# touch .Xmodmap
Now follow the step relevant to your Zboard MERC.
[edit] MERC Keyboard
Add the following to your .Xmodmap file.
| File: .Xmodmap |
! ZBoard MERC Keyboard Config ! Created by Matt 'aka Mr. Pig' Razza ! [START] Multimedia Keys (Music) keycode 162 = XF86AudioPlay keycode 164 = XF86AudioStop keycode 160 = XF86AudioMute keycode 144 = XF86AudioPrev keycode 153 = XF86AudioNext keycode 176 = XF86AudioRaiseVolume keycode 174 = XF86AudioLowerVolume ! [END] Multimedia Keys (Music) ! [START] Program Load (Custom - I, II, III) Keys ! keycode 182 = ! keycode 183 = ! keycode 184 = ! [END] Program Load (Custom - I, II, III) Keys ! [START] Numpad keycode 245 = BackSpace KP_0 keycode 107 = Delete KP_1 keycode 188 = XF86Cut KP_2 keycode 248 = XF86Copy KP_3 keycode 106 = Insert KP_4 keycode 103 = End KP_5 keycode 105 = Next KP_6 keycode 122 = XF86ModeLock KP_7 keycode 97 = Home KP_8 keycode 99 = Prior KP_9 keycode 192 = plus keycode 82 = minus keycode 198 = asterisk keycode 232 = slash ! [END] Numpad ! [START] Gamepad of Keyboard (LEFT) ! Red Area (Movement) ! keycode 231 = q ! keycode 130 = w ! keycode 122 = e ! keycode 234 = a ! keycode 232 = s ! keycode 233 = d ! Left Area (Score, Voice) ! keycode 140 = Caps_Lock ! keycode 161 = Tab ! keycode 236 = Alt_L ! keycode 112 = Shift_L ! keycode 91 = Control_L ! Right Area (Reload, Use) ! keycode 230 = r ! keycode 157 = f ! keycode 247 = v ! keycode 170 = c ! keycode 93 = t ! keycode 131 = g ! keycode 132 = b ! keycode 63 = space ! keycode 191 = p ! [END] Gamepad of Keyboard (LEFT) |
As of now this only makes the numpad function, the code for the left gamepad is there, but commented as some of the keycodes overlap.
[edit] Getting xmodmap to load the file
Now you need to have xmodmap load the configuration file after X11 launches. To do this you need to type the following command into the terminal after it loads, or add it to a file that is executed after X11 loads.
# /usr/bin/xmodmap $HOME/.Xmodmap
Replace $HOME with the full path to your home directory.
[edit] Other Links
In case I forget to update this page, you may want to check the following thread (I'm Mr. Pig).
