#include <keyboard.h>
Inheritance diagram for SaX::SaXManipulateKeyboard:
Public Member Functions | |
virtual void | setXKBModel (const QString &) |
void | setXKBLayout (const QString &) |
void | addXKBLayout (const QString &) |
void | removeXKBLayout (const QString &) |
void | setXKBOption (const QString &) |
void | addXKBOption (const QString &) |
void | removeXKBOption (const QString &) |
void | setXKBVariant (const QString &, const QString &) |
void | removeXKBVariant (const QString &) |
void | setMapping (const QString &, const QString &) |
QString | getXKBVariant (const QString &) |
QString | getXKBModel (void) |
QList< QString > | getXKBOptionList (void) |
QList< QString > | getXKBLayout (void) |
QList< QString > | getXKBVariantList (void) |
QString | getDriver (void) |
bool | selectKeyboard (int) |
SaXManipulateKeyboard (SaXImport *, int=0) |
The keyboard manipulator requires one import object (Keyboard) to become created. Once created the manipulator object is able to get/set specific keyboard options and is able to access the XKB file extension to know about the supported keyboards. The following example will demonstrate how to add an additional keyboard layout to the core layout:
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; SaXImport* import = new SaXImport ( SAX_KEYBOARD ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); printf ("Add czech keyboard layout...\n"); SaXManipulateKeyboard mKeyboard ( section["Keyboard"] ); if (mKeyboard.selectKeyboard (SAX_CORE_KBD)) { mKeyboard.addXKBLayout ("cz"); } printf ("Writing configuration\n"); config->setMode (SAX_MERGE); if ( ! config->createConfiguration() ) { printf ("%s\n",config->errorString().ascii()); printf ("%s\n",config->getParseErrorValue().ascii()); return 1; } return 0; }
Definition at line 202 of file keyboard.h.
|
An object of this type is used to manipulate the keyboard settings refering to the X11 InputDevice sections. In contrast to pointer devices the keyboards are enumerated as 0,2,4,6,etc Definition at line 180 of file keyboard.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excKeyboardImportBindFailed(), SaX::SaXException::excNullPointerArgument(), and SaX::SaXImport::getSectionID(). Here is the call graph for this function: ![]() |
|
add a keyboard layout to the basic layout to be able to switch between different layouts. The first layout in the list defines the basic layout Implements SaX::SaXManipulateKeyboardIF. Definition at line 253 of file keyboard.cpp. |
|
add a keyboard option to the current list of keyboard options Implements SaX::SaXManipulateKeyboardIF. Definition at line 306 of file keyboard.cpp. |
|
return the driver used for this keyboard device Implements SaX::SaXManipulateKeyboardIF. Definition at line 434 of file keyboard.cpp. |
|
return a list of XKB layouts set for the core keyboard the first element of the list os the core layout Implements SaX::SaXManipulateKeyboardIF. Definition at line 461 of file keyboard.cpp. Referenced by setXKBVariant(). |
|
return the keyboard model name used for this keyboard. Only one model can be defined and active Implements SaX::SaXManipulateKeyboardIF. Definition at line 522 of file keyboard.cpp. |
|
return a list of XKB options set for the core keyboard Implements SaX::SaXManipulateKeyboardIF. Definition at line 447 of file keyboard.cpp. |
|
return the variant defined for the given layout (layout) if there is no variant defined for the layout an empty string is returned. if the layout doesn't exist and exception will be throwed and an empty string is returned Implements SaX::SaXManipulateKeyboardIF. Definition at line 491 of file keyboard.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excXKBLayoutUndefined(), and getXKBVariantList(). Here is the call graph for this function: ![]() |
|
return a list of variants following the list of defined keyboard layouts Implements SaX::SaXManipulateKeyboardIF. Definition at line 476 of file keyboard.cpp. Referenced by getXKBVariant(), and setXKBVariant(). |
|
remove the given layout (layout) from the current list of keyboard layouts Implements SaX::SaXManipulateKeyboardIF. Definition at line 274 of file keyboard.cpp. |
|
remove a keyboard option. If the option (option) does not exist nothing will happen Implements SaX::SaXManipulateKeyboardIF. Definition at line 326 of file keyboard.cpp. |
|
remove the variant set for the layout (layout). This method simply call setXKBVariant() with an empty variant Implements SaX::SaXManipulateKeyboardIF. Definition at line 382 of file keyboard.cpp. References setXKBVariant(). Here is the call graph for this function: ![]() |
|
select the keyboard device the changes should be applied to if the device does not exist (false) is returned Implements SaX::SaXManipulateKeyboardIF. Definition at line 207 of file keyboard.cpp. |
|
set mapping for the special keys Left/Right-Alt Scroll-Lock and Right Ctrl key. If wrong type or mappings are set an invalid argument exception will be thrown Implements SaX::SaXManipulateKeyboardIF. Definition at line 393 of file keyboard.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excInvalidArgument(). Here is the call graph for this function: ![]() |
|
set the basic keyboard layout. This method will overwrite the current layout setting Implements SaX::SaXManipulateKeyboardIF. Definition at line 239 of file keyboard.cpp. |
|
set global keyboard model to define the basic keyboard hardware type Implements SaX::SaXManipulateKeyboardIF. Definition at line 225 of file keyboard.cpp. |
|
set keyboard option. This will overwrite the current options list used for all keyboards Implements SaX::SaXManipulateKeyboardIF. Definition at line 292 of file keyboard.cpp. |
|
set a variant for the given keyboard layout. If the layout has not been set an exception will be thrown. Implements SaX::SaXManipulateKeyboardIF. Definition at line 344 of file keyboard.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excXKBLayoutUndefined(), getXKBLayout(), and getXKBVariantList(). Referenced by removeXKBVariant(). Here is the call graph for this function: ![]() |