KDE 4.3 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KKeyServer Namespace Reference

from PyKDE4.kdeui.KKeyServer import *

Detailed Description

A collection of functions for the conversion of key presses and their modifiers from the window system specific format to the generic format and vice-versa.


Functions

long accelModMaskX ()
bool codeWinToKeyQt (long sym, int keyQt)
bool initializeMods ()
bool keyQtToCodeMac (int keyQt, [long] keyCodes)
bool keyQtToCodeWin (int keyQt, long sym)
bool, int (keyCode) keyQtToCodeX (int keyQt, )
bool keyQtToModMac (int keyQt, long mod)
bool keyQtToModWin (int keyQt, long mod)
bool, long (mod) keyQtToModX (int keyQt, )
bool keyQtToSymMac (int keyQt, int sym)
bool, int (sym) keyQtToSymX (int keyQt, )
bool keyboardHasMetaKey ()
QString modToStringUser (long mod)
bool modWinToKeyQt (long mod, int keyQt)
long modXAlt ()
long modXCtrl ()
long modXLock ()
long modXLock ()
long modXMeta ()
long modXModeSwitch ()
long modXNumLock ()
long modXScrollLock ()
long modXShift ()
bool, int (modQt) modXToQt (long modX, )
long stringUserToMod (QString mod)
bool, int (keyQt) symXToKeyQt (long sym, )
bool xEventToQt (XEvent e, int keyModQt)

Function Documentation

long accelModMaskX (   self )

Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available).

See also:
modXShift()
See also:
modXLock()
See also:
modXCtrl()
See also:
modXAlt()
See also:
modXNumLock()
See also:
modXWin()
See also:
modXScrollLock()

bool codeWinToKeyQt ( long  sym,
int  keyQt
)
bool initializeMods (   self )
bool keyQtToCodeMac ( int  keyQt,
[long]  keyCodes
)

Extracts all the scancodes from the given Qt key. The returned values can change if a different keyboard layout is selected.

Parameters:
keyQt  the qt key code
keyCodes  if successful, a list of scancodes will be written here

Returns:
true if successful, false otherwise

bool keyQtToCodeWin ( int  keyQt,
long  sym
)

Extracts the symbol from the given Qt key and converts it to a Windows symbol.

Parameters:
keyQt  the qt key code
sym  if successful, the symbol will be written here

Returns:
true if successful, false otherwise

bool, int (keyCode) keyQtToCodeX ( int  keyQt,
)

Extracts the code from the given Qt key.

Parameters:
keyQt  the qt key code
keyCode  if successful, the symbol will be written here

Returns:
true if successful, false otherwise

bool keyQtToModMac ( int  keyQt,
long  mod
)

Extracts the modifiers from the given Qt key and converts them in a mask of OSX modifiers.

Parameters:
keyQt  the qt key code
mod  if successful, the modifiers will be written here

Returns:
true if successful, false otherwise

bool keyQtToModWin ( int  keyQt,
long  mod
)

Extracts the modifiers from the given Qt key and converts them in a mask of Windows modifiers.

Parameters:
keyQt  the qt key code
mod  if successful, the modifiers will be written here

Returns:
true if successful, false otherwise

bool, long (mod) keyQtToModX ( int  keyQt,
)

Extracts the modifiers from the given Qt key and converts them in a mask of X11 modifiers.

Parameters:
keyQt  the qt key code
mod  if successful, the modifiers will be written here

Returns:
true if successful, false otherwise

bool keyQtToSymMac ( int  keyQt,
int  sym
)

Extracts the symbol from the given Qt key, and converts it to an OSX symbol.

Parameters:
keyQt  the qt key code
sym  if successful, the symbol will be written here

Returns:
true if successful, false otherwise

bool, int (sym) keyQtToSymX ( int  keyQt,
)

Extracts the symbol from the given Qt key and converts it to an X11 symbol + modifiers.

Parameters:
keyQt  the qt key code
sym  if successful, the symbol will be written here

Returns:
true if successful, false otherwise

bool keyboardHasMetaKey (   self )

Returns true if the current keyboard layout supports the Meta key. Specifically, whether the Super or Meta keys are assigned to an X modifier.

Returns:
true if the keyboard has a Meta key
See also:
modXMeta()

QString modToStringUser ( long  mod
)

Converts the mask of ORed KKey.ModFlag modifiers to a user-readable string.

Parameters:
mod  the mask of ORed KKey.ModFlag modifiers

Returns:
the user-readable string

bool modWinToKeyQt ( long  mod,
int  keyQt
)
long modXAlt (   self )

Returns the X11 Alt (Mod1) modifier mask/flag.

Returns:
the X11 Alt (Mod1) modifier mask/flag.
See also:
accelModMaskX()

long modXCtrl (   self )

Returns the X11 Ctrl modifier mask/flag.

Returns:
the X11 Ctrl modifier mask/flag.
See also:
accelModMaskX()

long modXLock (   self )

Returns the X11 Lock modifier mask/flag.

Returns:
the X11 Lock modifier mask/flag.
See also:
accelModMaskX()

long modXLock (   self )

Returns the X11 Lock modifier mask/flag.

Returns:
the X11 Lock modifier mask/flag.
See also:
accelModMaskX()

long modXMeta (   self )

Returns the X11 Win (Mod3) modifier mask/flag.

Returns:
the X11 Win (Mod3) modifier mask/flag.
See also:
keyboardHasWinKey()
See also:
accelModMaskX()

long modXModeSwitch (   self )

Returns the X11 Mode_switch modifier mask/flag.

Returns:
the X11 Mode_switch modifier mask/flag.
See also:
accelModMaskX()

long modXNumLock (   self )

Returns the X11 NumLock modifier mask/flag.

Returns:
the X11 NumLock modifier mask/flag.
See also:
accelModMaskX()

long modXScrollLock (   self )

Returns the X11 ScrollLock modifier mask/flag.

Returns:
the X11 ScrollLock modifier mask/flag.
See also:
accelModMaskX()

long modXShift (   self )

Returns the X11 Shift modifier mask/flag.

Returns:
the X11 Shift modifier mask/flag.
See also:
accelModMaskX()

bool, int (modQt) modXToQt ( long  modX,
)

Converts the mask of ORed X11 modifiers to a mask of ORed Qt key code modifiers.

Parameters:
modX  the mask of X11 modifiers
modQt  the mask of Qt key code modifiers will be written here if successful

Returns:
true if successful, false otherwise

long stringUserToMod ( QString  mod
)

Converts the modifier given as user-readable string to KKey.ModFlag modifier, or 0.

Internal:

bool, int (keyQt) symXToKeyQt ( long  sym,
)

Converts the given symbol to a Qt key code.

Parameters:
sym  the symbol
keyQt  if successful, the qt key code will be written here

Returns:
true if successful, false otherwise

bool xEventToQt ( XEvent  e,
int  keyModQt
)

Converts an X keypress event into a Qt key + modifier code

Parameters:
e  the X11 keypress event
keyModQt  the Qt keycode and mask of Qt key code modifiers will be written here if successful

Returns:
true if successful, false otherwise

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal