X Mouse Button Control Linux

Btnx (button x) can be used to configure the mouse buttons in Linux for a variety of pointing devices. With a three button mouse, typically people keep the default settings. With a five button mouse, the extra two buttons often go unused. The default is that they typically are used to go back and forward in web browsers and file managers. WizMouse is a mouse enhancement utility that makes your mouse wheel work on the. When you want to paste you press the middle button (if you just have a two button mouse, press both left and right button at the same time) and you paste the text. No need to configure anything, this is out of the box on all Unix and Linux machines with a XWindows System. Thankfully, Linux is a powerful system that allows users to set things as they like, so here is a quick guide on how to map your mouse. First, make sure to install the packages “xbindkeys” and “xautomation”. Then open a terminal and type “xev” and press enter. The X server reports ButtonPress or ButtonRelease events to clients wanting information about buttons that logically change state. The X server reports MotionNotify events to clients wanting information about when the pointer logically moves. The X server generates this event whenever the pointer is moved and the pointer motion begins and ends.

xdotool: command-line X11 automation tool

Command to display xdotool manual in Linux: $ man 1 xdotool

NAME

xdotool - command-line X11 automation tool

SYNOPSIS

xdotoolcmdargs..

Notation: Some documentation uses [window] to denote an optionalwindow argument. This case means that the argument, if not present, willdefault to ``%1'. See ``WINDOW STACK' for what ``%1' means.

DESCRIPTION

xdotool lets you programmatically (or manually) simulate keyboard input andmouse activity, move and resize windows, etc. It does this using X11'sXTEST extension and other Xlib functions.

There is some support for Extended Window Manager Hints (aka EWMH or NetWM).See the ``EXTENDED WINDOW MANAGER HINTS' section for more information.

KEYBOARD COMMANDS

key[options]keystroke [keystroke ..]
Options:
--window window
Send keystrokes to a specific window id. You can use``WINDOW STACK' references like ``%1' and ``%@' here. If there is a window stack,then ``%1' is the default, otherwise the current window is used.

See also: ``SENDEVENT NOTES' and ``WINDOW STACK'

--clearmodifiers
Clear modifiers before sending keystrokes. See CLEARMODIFIERS below.
--delay milliseconds
Delay between keystrokes. Default is 12ms.

Type a given keystroke. Examples being ``alt+r', ``Control_L+J',``ctrl+alt+n', ``BackSpace'.

Generally, any valid X Keysym string will work. Multiple keys areseparated by '+'. Aliases exist for ``alt', ``ctrl', ``shift', ``super',and ``meta' which all map to Foo_L, such as Alt_L and Control_L, etc.

In cases where your keyboard doesn't actually have the key you want to type,xdotool will automatically find an unused keycode and use that to type the key.

With respect to ``COMMAND CHAINING', this command consumes the remainder of thearguments or until a new xdotool command is seen, because no xdotool commandsare valid keystrokes.

Example: Send the keystroke ``F2'
xdotool key F2

Example: Send 'a' with an accent over it (not on English keyboards, but stillworks with xdotool)
xdotool key Aacute

Example: Send ctrl+l and then BackSpace as separate keystrokes:
xdotool key ctrl+l BackSpace

Example: Send ctrl+c to all windows matching title 'gdb' (See ``COMMAND CHAINING')
xdotool search --name gdb key ctrl+c

keydown[options]keystroke
Same as above, except only keydown (press) events are sent.
keyupkeystroke
Same as above, except only keyup (release) events are sent.
type[options]something to type
Options:
--window windowid
Send keystrokes to a specific window id. See ``SENDEVENT NOTES' below. Thedefault, if no window is given, depends on the window stack. If the windowstack is empty the current window is typed at using XTEST. Otherwise, thedefault is ``%1' (see ``WINDOW STACK').
--delay milliseconds
Delay between keystrokes. Default is 12ms.
--clearmodifiers
Clear modifiers before sending keystrokes. See CLEARMODIFIERS below.

Types as if you had typed it. Supports newlines and tabs (ASCII newline andtab). Each keystroke is separated by a delay given by the --delay option.

With respect to ``COMMAND CHAINING', this command consumes the remainder of thearguments and types them. That is, no commands can chain after 'type'.

Example: to type 'Hello world!' you would do:
xdotool type 'Hello world!'

MOUSE COMMANDS

mousemove[options]x y OR 'restore'
Move the mouse to the specific X and Y coordinates on the screen.

You can move the mouse to the previous location if you specify 'restore'instead of an X and Y coordinate. Restoring only works if you have movedpreviously in this same command invocation. Further, it does not work with the--window option.

For example, to click the top-left corner of the screen and move the mouse tothe original position before you moved it, use this:
xdotool mousemove 0 0 click 1 mousemove restore

--window WINDOW
Specify a window to move relative to. Coordinates 0,0 are at the top left ofthe window you choose.

``WINDOW STACK' references are valid here, such as %1 and %@. Though, using %@probably doesn't make sense.

--screen SCREEN
Move the mouse to the specified screen to move to. This is only useful if youhave multiple screens and ARE NOT using Xinerama.

The default is the current screen. If you specify --window, the --screen flagis ignored.

--polar
Use polar coordinates. This makes 'x' an angle (in degrees, 0-360, etc) and 'y'the distance.

Rotation starts at 'up' (0 degrees) and rotates clockwise: 90 = right, 180 =down, 270 = left.

The origin defaults to the center of the current screen. If you specify a--window, then the origin is the center of that window.

--clearmodifiers
See CLEARMODIFIERS
--sync
After sending the mouse move request, wait until the mouse is actuallymoved. If no movement is necessary, we will not wait. This is useful forscripts that depend on actions being completed before moving on.

Note: We wait until the mouse moves at all, not necessarily that itactually reaches your intended destination. Some applications lock themouse cursor to certain regions of the screen, so waiting for any movement isbetter in the general case than waiting for a specific target.

mousemove_relative [options] xy
Move the mouse x,y pixels relative to the current position of the mouse cursor.
--polar
Use polar coordinates. This makes 'x' an angle (in degrees, 0-360, etc) and 'y'the distance.

Rotation starts at 'up' (0 degrees) and rotates clockwise: 90 = right, 180 =down, 270 = left.

--sync
After sending the mouse move request, wait until the mouse is actuallymoved. If no movement is necessary, we will not wait. This is useful forscripts that depend on actions being completed before moving on.

Note that we wait until the mouse moves at all, not necessarily that itactually reaches your intended destination. Some applications lock the mousecursor to certain regions of the screen, so waiting for any movement is betterin the general case than waiting for a specific target.

--clearmodifiers
See CLEARMODIFIERS
click[options]button
Send a click, that is, a mousedown followed by mouseup for the given buttonwith a short delay between the two (currently 12ms).

Buttons generally map this way: Left mouse is 1, middle is 2, right is 3,wheel up is 4, wheel down is 5.

--clearmodifiers
Clear modifiers before clicking. See CLEARMODIFIERS below.
--repeatREPEAT
Specify how many times to click. Default is 1. For a double-click, use'--repeat 2'
--delayMILLISECONDS
Specify how long, in milliseconds, to delay between clicks. This option is notused if the --repeat flag is set to 1 (default).
--windowWINDOW
Specify a window to send a click to. See ``SENDEVENT NOTES' below for caveats. Uses thecurrent mouse position when generating the event.

The default, if no window is given, depends on the window stack. If the windowstack is empty the current window is typed at using XTEST. Otherwise, thedefault is ``%1' (see ``WINDOW STACK').

mousedown[options]button
Same as click, except only a mouse down is sent.
mouseup[options]button
Same as click, except only a mouse up is sent.
getmouselocation[--shell]
Outputs the x, y, screen, and window id of the mouse cursor. Screen numbers willbe nonzero if you have multiple monitors and are not using Xinerama.
--shell
This makes getmouselocation output shell data you can eval. Example:
behave_screen_edge[options]wherecommand ..
Bind an action to events when the mouse hits the screen edge or corner.

Options are:

--delay MILLISECONDS
Delay in milliseconds before running the command. This allows you to requirea given edge or corner to be held for a short period before your command willrun. If you leave the edge or corner before the delay expires then the timewill reset.
--quiesce MILLISECONDS
Delay in milliseconds before the next command will run. This helps preventaccidentally running your command extra times; especially useful if you havea very short --delay (like the default of 0).

Event timeline

Valid 'where' values are:

COMMAND CHAINING', the search command will only write windowids to stdout if it is the last (or only) command in the chain; otherwise, itis silent.

The result is saved to the window stack for future chained commands. See``WINDOW STACK' and ``COMMAND CHAINING' for details.

The default options are '--name --class --classname' (unless you specify oneone or more of --name --class or --classname).

The options available are:

--class
Match against the window class.
--classname
Match against the window classname.
--maxdepth N
Set recursion/child search depth. Default is -1,meaning infinite. 0 means no depth, only root windows will be searched. If youonly want toplevel windows, set maxdepth of 1 (or 2, depending on how yourwindow manager does decorations).
--name
Match against the window name. This is the same string that is displayed in thewindow titlebar.
--onlyvisible
Show only visible windows in the results. This means ones with map stateIsViewable.
--pid PID
Match windows that belong to a specific process id. This may not work for someX applications that do not set this metadata on its windows.
--screen N
Select windows only on a specific screen. Default is tosearch all screens. Only meaningful if you have multiple displays and are notusing Xinerama.
--desktop N
Only match windows on a certain desktop. 'N' is a number. The defaultis to search all desktops.
--limit N
Stop searching after finding N matching windows. Specifying a limit will helpspeed up your search if you only want a few results.

The default is no search limit (which is equivalent to '--limit 0')

--title
DEPRECATED. See --name.
--all
Require that all conditions be met. For example:

This will match only windows that have ``Hello World' as a name and are owned bypid 1424.

--any
Match windows that match any condition (logically, 'or'). This is on bydefault. For example:

This will match any windows owned by pid 1424 or windows with name ``HelloWorld'

--sync
Block until there are results. This is useful when you are launching anapplication and want to wait until the application window is visible.For example:
selectwindow
Get the window id (for a client) by clicking on it. Useful for having scriptsquery you humans for what window to act on. For example, killing a window byclicking on it:
behavewindowactioncommand ..
Bind an action to an event on a window. This lets you run additional xdotoolcommands whenever a matched event occurs.

The command run as a result of the behavior is run with %1 being the windowthat was acted upon. Examples follow after the event list.

The following are valid events:

mouse-enter
Fires when the mouse enters a window. This is similar to 'mouse over' events injavascript, if that helps.
mouse-leave
Fires when the mouse leaves a window. This is the opposite of 'mouse-enter'
mouse-click
Fires when the mouse is clicked. Specifically, when the mouse button is released.
focus
Fires when the window gets input focus.
blur
Fires when the window loses focus.

Examples:

getwindowpid[window]
Output the PID owning a given window. This requires effort from the applicationowning a window and may not work for all windows. This uses _NET_WM_PIDproperty of the window. See ``EXTENDED WINDOW MANAGER HINTS' below for moreinformation.

If no window is given, the default is '%1'. If no windows are on the stack, thenthis is an error. See ``WINDOW STACK' for more details.

Example: Find the PID for all xterms:
xdotool search --class xterm getwindowpid %@

getwindowname[window]
Output the name of a given window, also known as the title. This is the textdisplayed in the window's titlebar by your window manager.

If no window is given, the default is '%1'. If no windows are on the stack, thenthis is an error. See ``WINDOW STACK' for more details.

getwindowgeometry [options] [window]
Output the geometry (location and position) of a window. The values include: x,y, width, height, and screen number.
--shell
Output values suitable for 'eval' in a shell.
getwindowfocus [-f]
Prints the window id of the currently focused window. Saves the result to thewindow stack. See ``WINDOW STACK' for more details.

If the current window has no WM_CLASS property, we assume it is not a normaltop-level window and traverse up the parents until we find a window with aWM_CLASS set and return that window id.

If you really want the window currently having focus and don't care if it has aWM_CLASS setting, then use 'getwindowfocus -f'

windowsize [options] [window] width height
Set the window size of the given window. If no window is given, %1 is thedefault. See ``WINDOW STACK' and ``COMMAND CHAINING' for more details.

Percentages are valid for width and height. They are relative to the geometryof the screen the window is on. For example, to make a window the full width ofthe screen, but half height:

Percentages are valid with --usehints and still mean pixel-width relative tothe screen size.

The options available are:

--usehints
Use window sizing hints (when available) to set width and height. This isuseful on terminals for setting the size based on row/column of text ratherthan pixels.
--sync
After sending the window size request, wait until the window is actuallyresized. If no change is necessary, we will not wait. This is useful forscripts that depend on actions being completed before moving on.

Note: Because many window managers may ignore or alter the original resizerequest, we will wait until the size changes from its original size, notnecessary to the requested size.

Example: To set a terminal to be 80x24 characters, you would use:
xdotool windowsize --usehints some_windowid 80 24

windowmove[options][window]xy
Move the window to the given position. If no window is given, %1 is thedefault. See ``WINDOW STACK' and ``COMMAND CHAINING' for more details.

If the given x coordinate is literally 'x', then the window's current xposition will be unchanged. The same applies for 'y'.

Examples:

Percentages are valid for width and height. They are relative to the geometryof the screen the window is on. For example, to make a window the full width ofthe screen, but half height:

--sync
After sending the window move request, wait until the window is actuallymoved. If no movement is necessary, we will not wait. This is useful forscripts that depend on actions being completed before moving on.
--relative
Make movement relative to the current window position.
windowfocus[options][window]
Focus a window. If no window is given, %1 is the default. See ``WINDOW STACK'and ``COMMAND CHAINING' for more details.

Uses XSetInputFocus which may be ignored by some window managers or programs.

--sync
After sending the window focus request, wait until the window is actuallyfocused. This is useful for scripts that depend on actions being completedbefore moving on.
windowmap[options][window]
Map a window. In X11 terminology, mapping a window means making it visible onthe screen. If no window is given, %1 is the default. See ``WINDOW STACK' and``COMMAND CHAINING' for more details.
--sync
After requesting the window map, wait until the window is actually mapped(visible). This is useful for scripts that depend on actions being completedbefore moving on.
windowminimize[options][window]
Minimize a window. In X11 terminology, this is called 'iconify.'If no window is given, %1 is the default. See ``WINDOW STACK' and``COMMAND CHAINING' for more details.
--sync
After requesting the window minimize, wait until the window is actuallyminimized. This is useful for scripts that depend on actions being completedbefore moving on.
windowraise[window_id=%1]
Raise the window to the top of the stack. This may not work on all windowmanagers. If no window is given, %1 is the default. See ``WINDOW STACK' and``COMMAND CHAINING' for more details.
windowreparent[source_window]destination_window
Reparent a window. This moves the source_window to be a child window ofdestination_window. If no source is given, %1 is the default.``WINDOW STACK' window references (like %1) are valid for both source_windowand destination_window See ``WINDOW STACK' and ``COMMAND CHAINING' for moredetails.
windowclose[window]
Close a window. This action will destroy the window, but will not tryto kill the client controlling it. If no window is given, %1 is thedefault. See ``WINDOW STACK' and ``COMMAND CHAINING' for more details.
windowkill[window]
Kill a window. This action will destroy the window and kill the clientcontrolling it. If no window is given, %1 is the default. See WINDOWSTACK and ``COMMAND CHAINING' for more details.
windowunmap[options][window_id=%1]
Unmap a window, making it no longer appear on your screen. If no window isgiven, %1 is the default. See ``WINDOW STACK' and ``COMMAND CHAINING' for moredetails.
--sync
After requesting the window unmap, wait until the window is actually unmapped(hidden). This is useful for scripts that depend on actions being completedbefore moving on.
set_window[options][windowid=%1]
Set properties about a window. If no window is given, %1 is the default. See``WINDOW STACK' and ``COMMAND CHAINING' for more details.

Options:

--name newname
Set window WM_NAME (the window title, usually)
--icon-name newiconname
Set window WM_ICON_NAME (the window title when minimized, usually)
--role newrole
Set window WM_WINDOW_ROLE
--classname newclassname
Set window class name (not to be confused with window class)
--class newclass
Set window class (not to be confused with window class name)
--urgency value
Set window urgency hint. If the value is 1, the window will be marked urgent,and the window manager will somehow highlight it for the user's attention.If the value is 0, the window will be marked non-urgent.
--overrideredirect value
Set window's override_redirect value. This value is a hint to the windowmanager for whether or not it should be managed. If the redirect value is 0,then the window manager will draw borders and treat this window normally. Ifthe value is 1, the window manager will ignore this window.

If you change this value, your window manager may not notice the change untilthe window is mapped again, so you may want to issue 'windowunmap' and'windowmap' to make the window manager take note.

DESKTOP AND WINDOW COMMANDS

These commands follow the EWMH standard. See the section ``EXTENDED WINDOWMANAGER HINTS' for more information.
windowactivate[options][window]
Activate the window. This command is different from windowfocus:if the window is on another desktop, we will switch to that desktop. It alsouses a different method for bringing the window up. I recommend trying thiscommand before using windowfocus, as it will work on more window managers.

If no window is given, %1 is the default. See ``WINDOW STACK' and``COMMAND CHAINING' for more details.

--sync
After sending the window activation, wait until the window is actuallyactivated. This is useful for scripts that depend on actions being completedbefore moving on.
getactivewindow
Output the current active window. This command is often more reliable thangetwindowfocus. The result is saved to the window stack. See ``WINDOW STACK'for more details.
set_num_desktopsnumber
Changes the number of desktops or workspaces.
get_num_desktops
Output the current number of desktops.
get_desktop_viewport[--shell]
Report the current viewport's position. If --shell is given, the output isfriendly to shell eval.

Viewports are sometimes used instead of 'virtual desktops' on some windowmanagers. A viewport is simply a view on a very large desktop area.

set_desktop_viewportxy
Move the viewport to the given position. Not all requests will be obeyed - somewindowmangers only obey requests that align to workspace boundaries, such asthe screen size.

For example, if your screen is 1280x800, you can move to the 2nd workspace by doing:
xdotool set_desktop_viewport 1280 0

set_desktop[options]desktop_number
Change the current view to the specified desktop.
--relative
Use relative movements instead of absolute. This lets you move relative to thecurrent desktop.
get_desktop
Output the current desktop in view.
set_desktop_for_window[window]desktop_number
Move a window to a different desktop. If no window is given, %1 is thedefault. See ``WINDOW STACK' and ``COMMAND CHAINING' for more details.
get_desktop_for_window[window]
Output the desktop currently containing the given window. Move a window to adifferent desktop. If no window is given, %1 is the default. See WINDOWSTACK and ``COMMAND CHAINING' for more details.

MISCELLANEOUS COMMANDS

exec[options]command[..]
Execute a program. This is often useful when combined with behave_screen_edgeto do things like locking your screen.

Options:

--sync
Block until the child process exits. The child process exit status is thenpassed to the parent process (xdotool) which copies it.

Examples:
# Lock the screen when the mouse sits in the top-right corner
xdotool behave_screen_edge --delay 1000 top-right
exec gnome-screensaver-command --lock
# Substitute 'xscreensaver-command -lock' if you use that program.

sleepseconds
Sleep for a specified period. Fractions of seconds (like 1.3, or 0.4) arevalid, here.

SCRIPTS

xdotool can read a list of commands via stdin or a file if you want. A scriptwill fail when any command fails.

Truthfully, 'script' mode isn't fully fleshed out and may fall below yourexpectations. If you have suggestions, please email the list or file a bug (SeeCONTACT).

Scripts can use positional arguments (Represented by $1, $2, ..) andenvironment variables (like $HOME or $WINDOWID). Quoting arguments should workas expected.

Scripts are processed for parameter and environment variable expansion and thenrun as if you had invoked xdotool with the entire script on one line (usingCOMMAND CHAINING).

Running it like this will take 4 visible xterms, raise them, and move them intoa 2x2 tile grid with each window 600x400 pixels in size.

CLEARMODIFIERS

Any command taking the --clearmodifiers flag will attempt to clear anyactive input modifiers during the command and restore them afterwards.

For example, if you were to run this command:
xdotool key a

The result would be 'a' or 'A' depending on whether or not you were holding theshift key on your keyboard. Often it is undesirable to have any modifiersactive, so you can tell xdotool to clear any active modifiers.

The order of operations if you hold shift while running 'xdotool key --clearmodifiers a' is this:

3. Runs normal 'xdotool key a'
4. Restore shift key by sending 'key down' for shift

The --clearmodifiers flag can currently clear of the following:

mouse buttons (1, 2, 3, 4, and 5)
caps lock

SENDEVENT NOTES

If you are trying to send key input to a specific window, and it does notappear to be working, then it's likely your application is ignoring the eventsxdotool is generating. This is fairly common.

Sending keystrokes to a specific window uses a different API than simply typingto the active window. If you specify 'xdotool type --window 12345 hello'xdotool will generate key events and send them directly to window 12345.However, X11 servers will set a special flag on all events generated in thisway (see XEvent.xany.send_event in X11's manual). Many programs observe thisflag and reject these events.

It is important to note that for key and mouse events, we only useXSendEvent when a specific window is targeted. Otherwise, we use XTEST.

Some programs can be configured to accept events even if they are generated byxdotool. Seek the documentation of your application for help.

Specific application notes (from the author's testing):* Firefox 3 seems to ignore all input when it does not have focus.* xterm can be configured while running with ctrl+leftclick, 'Allow SendEvents'* gnome-terminal appears to accept generated input by default.

WINDOW STACK

Certain commands (search, getactivewindow, getwindowfocus) will find windowsfor you. These results generally printed to stdout, but they are also savedto memory for future use during the lifetime of the xdotool process. See``COMMAND CHAINING' for more information.

The only modifications support for the window stack are to replace it. That is,two of two sequential searches, only the last one's results will be the windowstack.

COMMAND CHAINING

xdotool supports running multiple commands on a single invocation. Generally,you'll start with a search command (see ``WINDOW STACK') and then perform aset of actions on those results.

To query the window stack, you can use special notation ``%N' where N is anumber or the '@' symbol. If %N is given, the Nth window will be selected fromthe window stack. Generally you will only want the first window or all windows.Note that the order of windows in the window stack corresponds to the windowstacking order, i.e. the bottom-most window will be reported first (seeXQueryTree(3)). Thus the order of the windows in the window stack may not beconsistent across invocations.

The notation described above is used as the ``window' argument for any givencommand.

For example, to resize all xterms to 80x24:

Resize move the current window:

In all cases, the default window argument, if omitted, will default to ``%1'. It isobviously an error if you omit the window argument and the window stack is empty. If youtry to use the window stack and it is empty, it is also an error.

To activate the first firefox window found:

These would error:

When xdotool exits, the current window stack is lost.

Additionally, commands that modify the ``WINDOW STACK' will not print theresults if they are not the last command. For example:

EXTENDED WINDOW MANAGER HINTS

The following pieces of the EWMH standard are supported:
, 'get_desktop'.
_NET_WM_DESKTOP
Query and set what desktop a window is living in. Support for this enablesthese commands: 'set_desktop_for_window', 'get_desktop_for_window'.
_NET_ACTIVE_WINDOW
Allows you to query and set the active window by asking the window manager tobring it forward. Support for this enables these commands: 'windowactivate', 'getactivewindow'.
_NET_WM_PID
This feature is application dependent, not window-manager dependent. Query thePID owning a given window. Support for this enables these commands:'getwindowpid'.

SUPPORTED FEATURES

xdotool (and libxdo) will try to function under all circumstances. However, there maybe some cases where functionality is not provided by your X server or by yourwindow manager. In these cases, xdotool will try to detect and tell you if an actionrequires a feature not currently supported by your system.

For window-manager specific features, see ``EXTENDED WINDOW MANAGER HINTS'.

XTEST
If your X server does not support XTEST,

X Mouse Button Control Linux Download

then some typing and mouse movementfeatures may not work. Specifically, typing and mouse actions that act on the``current window' (window 0 in libxdo) are unlikely to work.

In most cases, XTEST is a feature you can enable on your X server if it isnot enabled by default.

You can see the list of supported X extensions by typing 'xdpyinfo' and lookingthe text 'number of extensions: ..'

BUGS

Typing unusual symbols under non-us keybindings is known tooccasionally send the wrong character.

CONTACT

Please send questions to xdotool-users [at] googlegroups.com. File bugs and feature requests at the following URL:

<https://github.com/jordansissel/xdotool/issues>

Alternately, if you prefer email, feel free to file bugs by emailing the list.What works for you :)

AUTHOR

xdotool was written by Jordan Sissel.X mouse button control linux update

This manual page was written originally by Daniel Kahn Gillmor<dkg [at] fifthhorseman.net> for the Debian project (but may beused by others). It is maintained by Jordan Sissel.

Patches, ideas, and other contributions by many, nice folks. See the CHANGELISTfile for who provided what.

SEE ALSO

xprop(1), xwininfo(1),

Project site: <http://www.semicomplete.com/projects/xdotool>

Source code and Issues: <https://github.com/jordansissel/xdotool>

EWMH specification: <http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html>

Pages related to xdotool

  • xdelta3 (1) - VCDIFF (RFC 3284) binary diff tool
  • xdg-dbus-proxy (1) - D-Bus proxy
  • xdg-desktop-icon (1) - command line tool for (un)installing icons to the desktop
  • xdg-desktop-menu (1) - command line tool for (un)installing desktop menu items
  • xdg-email (1) - command line tool for sending mail using the user's preferred e-mail composer
  • xdg-icon-resource (1) - command line tool for (un)installing icon resources
Linux man pages generated by: SysTutorials. Linux Man Pages Copyright Respective Owners. Site Copyright © SysTutorials. All Rights Reserved.

NAME
SYNOPSIS
DESCRIPTION
SUPPORTED HARDWARE
CONFIGURATION DETAILS
SEE ALSO

NAME

mouse −Xorg mouse input driver

SYNOPSIS

Section'InputDevice'
Identifier '
idevname'
Driver 'mouse'
Option 'Protocol'
protoname'
Option 'Device' '
devpath'
..
EndSection

DESCRIPTION

mouse isan Xorg input driver for mice. The driver supports mostavailable mouse types and interfaces, though the level ofsupport for types of mice depends on the OS.

Themouse driver functions as a pointer input device.Multiple mice are supported by multiple instances of thisdriver.

SUPPORTED HARDWARE

USB mouse

USB (Universal Serial Bus)ports are present on most modern computers. Several devicescan be plugged into this bus, including mice and keyboards.Support for USB mice is platform specific.

PS/2 mouse

The PS/2 mouse is anintelligent device and may have more than three buttons anda wheel or a roller. The PS/2 mouse is usually compatiblewith the original PS/2 mouse from IBM immediately afterpower up. The PS/2 mouse with additional features requires aspecialized initialization procedure to enable thesefeatures. Without proper initialization, it behaves asthough it were an ordinary two or three button mouse.

Serial mouse

There have been numerous serialmouse models from a number of manufacturers. Despite thewide range of variations, there have been relatively fewprotocols (data format) with which the serial mouse talks tothe host computer.

The modernserial mouse conforms to the PnP COM device specification sothat the host computer can automatically detect the mouseand load an appropriate driver. This driver supports thisspecification and can detect popular PnP serial mouse modelson most platforms.

Bus mouse

The bus mouse connects to adedicated interface card in an expansion slot. Some oldervideo cards, notably those from ATI, and integrated I/Ocards may also have a bus mouse connector.

The interfacetype of the mouse can be determined by looking at theconnector of the mouse. USB mice have a thin rectangularconnector. PS/2 mice are equipped with a small, round DIN6-pin connector. Serial mouse have a D-Sub female 9- or25-pin connector. Bus mice have either a D-Sub male 9-pinconnector or a round DIN 9-pin connector. Some mice comewith adapters with which the connector can be converted toanother. If you are to use such an adapter, remember thatthe connector at the very end of the mouse/adapter pair iswhat matters.

CONFIGURATION DETAILS

Depending onthe X server version in use, input device options may be setin either a xorg.conf file, an xorg.conf.d snippet or in theconfiguration files read by the Hardware Abstraction Layer(HAL) daemon, hald(1).

Please refer toxorg.conf(5) for general configuration details and foroptions that can be used with all input drivers. Thissection only covers configuration details specific to thisdriver.

The driver canauto-detect the mouse type on some platforms. On someplatforms this is limited to plug and play serial mice, andon some the auto-detection works for any mouse that theOS’s kernel driver supports. On others, it is alwaysnecessary to specify the mouse protocol in the config file.The README document provided with this drivercontains some detailed information about this.

The followingdriver Options are supported:
Option 'Protocol'
string'

Specify the mouse protocol.Valid protocol types include:

Auto,Microsoft, MouseSystems, MMSeries, Logitech, MouseMan,MMHitTab, GlidePoint, IntelliMouse, ThinkingMouse,ValuMouseScroll, AceCad, PS/2, ImPS/2, ExplorerPS/2,ThinkingMousePS/2, MouseManPlusPS/2, GlidePointPS/2,NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse,USB, VUID, Xqueue.

Not allprotocols are supported on all platforms. The'Auto' protocol specifies that protocolauto-detection should be attempted. The default protocolsetting is platform-specific.

Option 'Device'string'

Specifies the device throughwhich the mouse can be accessed. A common setting is'/dev/mouse', which is often a symbolic link tothe real device. This option is mandatory, and there is nodefault setting. The server may however attempt to probesome default devices if this option is missing.

Option 'Buttons'integer'

Specifies the number of mousebuttons. In cases where the number of buttons cannot beauto-detected, the default value is 3. The maximum number is24.

Option'Emulate3Buttons'boolean'

Enable/disable the emulation ofthe third (middle) mouse button for mice which only have twophysical buttons. The third button is emulated by pressingboth buttons simultaneously. Default: on, until a press of aphysical button 3 is detected.

Option'Emulate3Timeout'integer'

Sets the timeout (inmilliseconds) that the driver waits before deciding if twobuttons where pressed 'simultaneously' when 3button emulation is enabled. Default: 50.

Option'ChordMiddle'boolean'

Enable/disable handling of micethat send left+right events when the middle button is used.Default: off.

Option'EmulateWheel'boolean'

Enable/disable'wheel' emulation. Wheel emulation means emulatingbutton press/release events when the mouse is moved while aspecific real button is pressed. Wheel button events(typically buttons 4 and 5) are usually used for scrolling.Wheel emulation is useful for getting wheel-like behaviourwith trackballs. It can also be useful for mice with 4 ormore buttons but no wheel. See the description of theEmulateWheelButton, EmulateWheelInertia,XAxisMapping, and YAxisMapping options below.Default: off.

Option'EmulateWheelButton'integer'

Specifies which button must beheld down to enable wheel emulation mode. While this buttonis down, X and/or Y pointer movement will generate buttonpress/release events as specified for theXAxisMapping and YAxisMapping settings. If setto 0, no button is required and any motion of the device isconverted into wheel events. Default: 4.

Option'EmulateWheelInertia'integer'

Specifies how far (in pixels)the pointer must move to generate button press/releaseevents in wheel emulation mode. Default: 10.

Option'EmulateWheelTimeout'integer'

Linux Mouse Button Mapping

Specifies the time inmilliseconds the EmulateWheelButton must be pressedbefore wheel emulation is started. If theEmulateWheelButton is released before this timeout,the original button press/release event is sent. Default:200.

Option'XAxisMapping' 'N1N2'

Specifies which buttons aremapped to motion in the X direction in wheel emulation mode.Button number N1 is mapped to the negative X axismotion and button number N2 is mapped to the positiveX axis motion. Default: no mapping.

Option'YAxisMapping' 'N1N2'

Specifies which buttons aremapped to motion in the Y direction in wheel emulation mode.Button number N1 is mapped to the negative Y axismotion and button number N2 is mapped to the positiveY axis motion. Default: no mapping.

Option'ZAxisMapping' 'X'
Option 'ZAxisMapping' 'Y'
Option 'ZAxisMapping' '
N1N2'
Option 'ZAxisMapping' '
N1 N2 N3N4'

Set the mapping for the Z axis(wheel) motion to buttons or another axis (X orY). Button number N1 is mapped to the negativeZ axis motion and button number N2 is mapped to thepositive Z axis motion. For mice with two wheels, fourbutton numbers can be specified, with the negative andpositive motion of the second wheel mapped respectively tobuttons number N3 and N4. Note that theprotocols for mice with one and two wheels can be differentand the driver may not be able to autodetect it. Default:'4 5'.

Option'ButtonMapping' 'N1 N2[..]'

Specifies how physical mousebuttons are mapped to logical buttons. Physical button 1 ismapped to logical button N1, physical button 2 toN2, and so forth. This enables the use of physicalbuttons that are obscured by ZAxisMapping.Default: '1 2 3 8 9 10 ..'.

Option 'FlipXY'boolean'

Enable/disable swapping the Xand Y axes. This transformation is applied after theInvX, InvY and AngleOffsettransformations. Default: off.

Option 'InvX'boolean'

Invert the X axis. Default:off.

Option 'InvY'boolean'

Invert the Y axis. Default:off.

Option'AngleOffset'integer'

Specify a clockwise angularoffset (in degrees) to apply to the pointer motion. Thistransformation is applied before the FlipXY,InvX and InvY transformations. Default: 0.

Option'SampleRate'integer'

Sets the number ofmotion/button events the mouse sends per second. Settingthis is only supported for some mice, including someLogitech mice and some PS/2 mice on some platforms. Default:whatever the mouse is already set to.

Option'Resolution'integer'

Sets the resolution of thedevice in counts per inch. Setting this is only supportedfor some mice, including some PS/2 mice on some platforms.Default: whatever the mouse is already set to.

Option'Sensitivity'float'

Mouse movements are multipliedby this float before being processed. Use this mechanism toslow down high resolution mice. Because values bigger than1.0 will result in not all pixels on the screen beingaccessible, you should better use mouse acceleration (seeman xset) for speeding up low resolution mice.Default: 1.0

Option'DragLockButtons' 'L1 B2 L3B4'

Sets 'drag lockbuttons' that simulate holding a button down, so thatlow dexterity people do not have to hold a button down atthe same time they move a mouse cursor. Button numbers occurin pairs, with the lock button number occurring first,followed by the button number that is the target of the lockbutton.

Remap Mouse Button Linux

Option'DragLockButtons'M1'

Sets a 'master drag lockbutton' that acts as a 'Meta Key' indicatingthat the next button pressed is to be 'draglocked'.

Option 'ClearDTR'boolean'

Enable/disable clearing the DTRline on the serial port used by the mouse. Somedual-protocol mice require the DTR line to be cleared tooperate in the non-default protocol. This option is forserial mice only and is handled by the X server. Default:off.

Option 'ClearRTS'boolean'

Enable/disable clearing the RTSline on the serial port used by the mouse. Somedual-protocol mice require the RTS line to be cleared tooperate in the non-default protocol. This option is forserial mice only and is handled by the X server. Default:off.

Option 'BaudRate'integer'

Set the baud rate to use forcommunicating with a serial mouse. This option should rarelybe required because the default is correct for almost allsituations. Valid values include: 300, 1200, 2400, 4800,9600, 19200. Default: 1200.

There are someother options that may be used to control various parametersfor serial port communication, but they are not documentedhere because the driver sets them correctly for each mouseprotocol type.

X Mouse Button Control Linux Operating System

SEE ALSO

X Mouse Button Control Linux Update

Xorg(1),xorg.conf(5), Xserver(1), X(7), README.mouse.

Linux Mouse Driver

hal(7),hald(8), fdi(5).