Package dogtail :: Module rawinput
[hide private]
[frames] | no frames]

Module rawinput

source code

Handles raw input using AT-SPI event generation.

Note: Think of keyvals as keysyms, and keynames as keystrings.

Authors: David Malcolm <dmalcolm@redhat.com>, Zack Cerza <zcerza@redhat.com>


Author: David Malcolm <dmalcolm@redhat.com>, Zack Cerza <zcerza@redhat.com>

Functions [hide private]
 
doTypingDelay() source code
 
checkCoordinates(x, y) source code
 
click(x, y, button=1, check=True)
Synthesize a mouse button click at (x,y)
source code
 
doubleClick(x, y, button=1, check=True)
Synthesize a mouse button double-click at (x,y)
source code
 
press(x, y, button=1, check=True)
Synthesize a mouse button press at (x,y)
source code
 
release(x, y, button=1, check=True)
Synthesize a mouse button release at (x,y)
source code
 
absoluteMotion(x, y, mouseDelay=None, check=True)
Synthesize mouse absolute motion to (x,y)
source code
 
relativeMotion(x, y, mouseDelay=None) source code
 
drag(fromXY, toXY, button=1, check=True)
Synthesize a mouse press, drag, and release on the screen.
source code
 
typeText(string)
Types the specified string, one character at a time.
source code
 
keySymToUniChar(keySym) source code
 
uniCharToKeySym(uniChar) source code
 
keySymToKeyName(keySym) source code
 
keyNameToKeySym(keyName) source code
 
keyNameToKeyCode(keyName)
Use GDK to get the keycode for a given keystring.
source code
 
pressKey(keyName)
Presses (and releases) the key specified by keyName.
source code
 
keyCombo(comboString)
Generates the appropriate keyboard events to simulate a user pressing the specified key combination.
source code
Variables [hide private]
  keyNameAliases = {'\t': 'Tab', '\n': 'Return', ' ': 'space', '...
  __package__ = 'dogtail'
Function Details [hide private]

typeText(string)

source code 

Types the specified string, one character at a time. Please note, you may have to set a higher typing delay, if your machine misses/switches the characters typed. Needed sometimes on slow setups/VMs typing non-ASCII utf8 chars.

keyNameToKeyCode(keyName)

source code 

Use GDK to get the keycode for a given keystring.

Note that the keycode returned by this function is often incorrect when the requested keystring is obtained by holding down the Shift key.

Generally you should use uniCharToKeySym() and should only need this function for nonprintable keys anyway.

pressKey(keyName)

source code 

Presses (and releases) the key specified by keyName. keyName is the English name of the key as seen on the keyboard. Ex: 'enter' Names are looked up in Gdk.KEY_ If they are not found there, they are looked up by uniCharToKeySym().

keyCombo(comboString)

source code 

Generates the appropriate keyboard events to simulate a user pressing the specified key combination.

comboString is the representation of the key combo to be generated. e.g. '<Control><Alt>p' or '<Control><Shift>PageUp' or '<Control>q'


Variables Details [hide private]

keyNameAliases

Value:
{'\t': 'Tab',
 '''
''': 'Return',
 ' ': 'space',
 'alt': 'Alt_L',
 'control': 'Control_L',
 'ctrl': 'Control_L',
 'del': 'Delete',
...