Difference between revisions of "Xbindkeys"

From ArchWiki
Jump to: navigation, search
m (removed # before commands that may be runned as non-root)
Line 20: Line 20:
  
 
Create a file .xbindkeysrc in your home dir
 
Create a file .xbindkeysrc in your home dir
# touch ~/.xbindkeysrc
+
  touch ~/.xbindkeysrc
  
 
Now you can either use the .xbindkeysrc to set keybindings or you can do that with the GUI
 
Now you can either use the .xbindkeysrc to set keybindings or you can do that with the GUI
Line 28: Line 28:
  
 
If you want to assign a shortcut key to a key run;
 
If you want to assign a shortcut key to a key run;
# xbindkeys -k
+
  xbindkeys -k
  
 
Give the command, you get the blank window that you want to assign a shortcut key when the selected key. For example i want to assign Alt + o
 
Give the command, you get the blank window that you want to assign a shortcut key when the selected key. For example i want to assign Alt + o
Line 46: Line 46:
  
 
If you installed the xbindkeys_config package, just run :
 
If you installed the xbindkeys_config package, just run :
# xbindkeys_config  
+
  xbindkeys_config  
  
 
== Usage ==
 
== Usage ==
  
 
Once your done configuring your keys edit your ~/.xinitrc and place  
 
Once your done configuring your keys edit your ~/.xinitrc and place  
# xbindkeys &
+
  xbindkeys &
 
Before your windows manager / DE starts
 
Before your windows manager / DE starts

Revision as of 13:15, 13 August 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

Xbindkeys

Xbindkeys is a program that enables us to assign specific functions, to a certain key on the keyboard. Xbindkeys work with multimedia keys and is window manager / DE independent, so if you switch much xbindkeys is very handy.

Installation

You can install xbindkeys from the standard repo's

# pacman -S xbindkeys

And you can also install the gui for xbindkeys [1] which is in AUR

Configuration

Create a file .xbindkeysrc in your home dir

  touch ~/.xbindkeysrc

Now you can either use the .xbindkeysrc to set keybindings or you can do that with the GUI

Xbindkeysrc

If you want to assign a shortcut key to a key run;

  xbindkeys -k

Give the command, you get the blank window that you want to assign a shortcut key when the selected key. For example i want to assign Alt + o I just run xbindkeys -k and press the key combination, this gives the following output:

# "(Scheme function)"
    m: alt + o: 120
    NoSymbol

Now you can copy this three lines to .xbindkeysrc and fill an command in "(Scheme function)" , then you will get something like this:

# "amixer sset Master toggle"
    m:0x0 + c:160
    NoSymbol 

The first line represents the command , the second the key , the third the symbol ( but there isn't any).

GUI method

If you installed the xbindkeys_config package, just run :

  xbindkeys_config 

Usage

Once your done configuring your keys edit your ~/.xinitrc and place

  xbindkeys &

Before your windows manager / DE starts