Re: [Linux] Çokluortam klavyesi

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Serkan Coban (mesaj.listeleri@gmail.com)
Date: Thu 05 Jan 2006 - 08:52:37 EET


Hangi siteden aldigimi unuttugum icin link veremiyorum asagidaki yazi
isinizi gorur sanirim...

*How to setup your keyboard's extra keys in X11.*

Well, it's the day after christmas and like me, you got this new keyboard
with all those sweet little buttons on top. How to configure that you may
ask? Let's explore this together

1. Requirements:

The method I use for using those keys is simple, and only requires a few
applications:
a) X11 (obviously)
b) xbindkeys
c) a text editor

2. Why?
There are many ways of doing this. I decided to use an external application
(xbindkeys) because I switch my window manager/desktop environment often,
and using an external application means that my setup can be carried over
from one to the other without having to reconfigure anything.

 3. Installation
Well, you should have X already installed. I know that you can map keys to
the console and blah blah blah. But if you know how to get around the
console and know that you can map keys at that level, you don't need my
help. Let's focus on getting it setup for X11
The only piece of software that needs installation is xbindkeys. First,
download the source from here<http://hocwp.free.fr/xbindkeys/xbindkeys.html>.
Right now, the latest version is 1.7.2.
Either download a binary package, emerge it, pacman it, etc... or compile
it. In order to keep this article within scope, here's a short instalation
tutorial:

Code:

# tar -zxvf xbindkeys-1.7.2.tar.gz

# cd xbindkeys-1.7.2

# ./configure && make && make install

4. Configuration
The first thing we need to do is to map the keyboard events to specific XF86
events. This is done by entering them in ~/.Xmodmap.
Here's a copy of mine:

Code:

keycode 161 = XF86Calculator

keycode 236 = XF86Mail

keycode 237 = XF86Music

keycode 230 = XF86WWW

keycode 178 = XF86MyComputer

keycode 162 = XF86AudioPlay

keycode 164 = XF86AudioStop

keycode 174 = XF86AudioLowerVolume

keycode 176 = XF86AudioRaiseVolume

keycode 160 = XF86AudioMute

keycode 144 = XF86AudioPrev

keycode 153 = XF86AudioNext

keycode 234 = XF86Terminal

keycode 233 = XF86Tools

keycode 223 = XF86PowerOff

keycode 229 = XF86Search

keycode 199 = XF86Messenger

Each line maps a specific keycode to a specific X event handler. To know
what those codes are for your keyboard, use the 'xev' utility. When you run
xev, make sure its window is focused, and press the buttons you need the key
codes for. If you look at the terminal from which you started xev, you
should see something like this:

Grab that keycode, add it to ~/.Xmodmap, and associate it with an X event
handler. A full list of event handlers is available in
XKeysymDB<file://///usr/X11R6/lib/X11/XKeysymDB>
.
Once we have all our codes identified and mapped, time to configure
xbindkeys.
Create a file called ~/.xbindkeysrc that looks a little like this:

Code:

"xcalc"

XF86Calculator

"thunderbird"

XF86Mail

"beep-media-player"

XF86Music

"firefox"

XF86WWW

"rox-filer"

XF86MyComputer

"beep-media-player --play"

XF86AudioPlay

"beep-media-player --stop"

XF86AudioStop

"beep-media-player --fwd"

XF86AudioNext

"beep-media-player --rew"

XF86AudioPrev

"amixer set Master 1+"

XF86AudioRaiseVolume

"amixer set Master 1-"

XF86AudioLowerVolume

"amixer set Master toggle"

XF86AudioMute

"xterm -bg black -fg gray75"

XF86Terminal

"gvim"

XF86Tools

"rox-find"

XF86Search

"putty"

XF86PowerOff

"psi"

XF86Messenger

And done!
Now the only things left, is to add the following two lines to your
~/.xinitrc or whatever your window manager uses (I added them to
~/.icewm/startup in my case), and when you log back in, you will be able to
use this extra keys on your keyboard.

xmodmap ~/.Xmodmap
xbindkeys

On 1/4/06, Yasin ERGENE <yasin@crazy.com.tr> wrote:
>
>
> Merhabalar öncelikle vereceğiniz cevaplar için şimdiden teşekkür ederim.
> Benim sorunum klavyemdeki çokluortam tuşlarını nasıl çalıştırabilirim?
>
> xev ile çıktılarına baktığımda
>
> KeyPress event, serial 28, synthetic NO, window 0x1000001,
> root 0x40, subw 0x0, time 830466, (651,-128), root:(653,346),
> state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
> XLookupString gives 0 bytes: ""
>
> KeyRelease event, serial 28, synthetic NO, window 0x1000001,
> root 0x40, subw 0x0, time 830606, (651,-128), root:(653,346),
> state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
> XLookupString gives 0 bytes: ""
>
> KeyPress event, serial 28, synthetic NO, window 0x1000001,
> root 0x40, subw 0x0, time 830805, (651,-128), root:(653,346),
> state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
> XLookupString gives 0 bytes: ""
>
> KeyRelease event, serial 28, synthetic NO, window 0x1000001,
> root 0x40, subw 0x0, time 830972, (651,-128), root:(653,346),
> state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
> XLookupString gives 0 bytes: ""
>
> gibi geliyor. Benim yapmak istediğim bu tuşları kullanarak fluxbox altında
> çeşitli yazılımları kontrol etmek, cevaplar için çok teşekkür ederim...
>
>
>
>
> .:CRAZY:.
> ERG Tekstil Tur. Org. Hiz. San. Tic. Ltd. Sti.
>
> http://www.crazy.com.tr
> http://www.erg.com.tr
> _______________________________________________
> Linux mailing list
> Linux@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux
>

_______________________________________________
Linux mailing list
Linux@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.