Get the most out of your mouse with btnx

When you splashed out for a new swanky mouse like Logitech VX Nano, you sure want to make the most out of your investment, which means making its programmable buttons work. The problem is, however, that many Linux distributions recognize most mice as a generic pointing device, so none of the fancy extra buttons work right out of the box. Fortunately, the btnx utility can help you to turn your mouse into a versatile tool it meant to be.

btnx comes in two parts: the btnx daemon that does the behind-the-scenes work of managing mouse buttons events, and the btnx-config tool, a graphical front-end that helps configuring mouse button actions. btnx Web site provides packages for Ubuntu and openSUSE as well as source code archives for other distributions. As it often happens, the packages are a step behind the source code distribution, so if you want to install the latest and greatest version of btnx, you have to go the usual ”./configure make make install” route.

To configure your mouse, launch the btnx-config tool. The first thing you have to do is to identify your mouse and all its buttons. Press Detect mouse & buttons and let btnx-config to detect your mouse. btnx-config opens then the button detection wizard, which guides you through the process of detecting and labeling the mouse buttons. The detection procedure is rather straightforward. Press the Start button at the top of the window and keep clicking on a particular mouse button until the progress bar in the Button detection section reaches the end. Give then the button a name and press the Add button. Repeat these steps for other mouse buttons, and press OK when you are done.


Figure 1: Configuring btnx

Now that all the buttons has been recognized and labeled, it’s time to assign actions to them. Switch to the Button tab and select the mouse button in the left pane. Select the key you want to assign to the button from the Keycode drop-down list in the Key combination section. For example, if you want the Zoom button om the Logitech VX Nano mouse to act as a middle button, select the BTN_MIDDLE item. You can also assign up to three modifier keys, which allows you to define complex mouse button actions. Using this feature you can, for example, program the VX Nano’s tilting scroll wheel to move back and forth between pages in Firefox. To do this, you have to specify the appropriate keycode (KEY_RIGHT for right tilt and KEY_LEFT for the left tilt) and specify the KEY_LEFTALT modifier key, which emulates the left Alt key on the keyboard. When assigning a keyboard combination to a mouse button, remember to tick the Enable check box to activate the specified key button mapping.

Besides key combinations, you can use mouse buttons to execute user-defined commands. For example, you can use the Zoom button to launch a text editor, KDE Control Center, or something else. To do this, select Command execution item from the Event type drop-down list, and enter a command you want into the Execute command field.

btnx supports multiple configuration profiles, which can come in handy if you use two or more mice with your computer (for example, a fancy trackball when you are working at your desk and a notebook mouse when you are on the move).

After you’ve laboriously configured all the buttons to your liking, you might want to transfer the settings to another machine or just backup the settings. To do this, simply press the Backup button and save the created backup file in a desired location. The Restore button allows you to restore the settings from the saved backup file when needed.

If you have a mouse with programmable buttons, you ought to give btnx a try. It allows you to unleash your mouse potential and turn it into a powerful and versatile tool.

If you like this article, please consider visiting our patron WorldLabel. This company not only provides a vast range of high-quality Avery-compatible labels, but also supports open source software.

Related articles:

Get the most out of your mouse with btnx    
No-nonsense guide to configuring Conky    

AddThis Social Bookmark Button

 
articles/btnx.txt · Last modified: 2010/03/10 19:45 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Need high-quality compatible Avery labels? Get them at WorldLabel.
Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki