MauiKit Terminal
KeyboardTranslator.h
88 };
115 };
154 QByteArray text(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const;
168 QByteArray escapedText(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const;
230 QString resultToString(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const;
495 QHash<QString, KeyboardTranslator *> _translators; // maps translator-name -> KeyboardTranslator
549inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards, Qt::KeyboardModifiers modifiers) const
Manages the keyboard translations available for use by terminal sessions, see KeyboardTranslator.
Definition KeyboardTranslator.h:432
Parses the contents of a Keyboard Translator (.keytab) file and returns the entries found in it.
Definition KeyboardTranslator.h:347
Writes a keyboard translation to disk.
Definition KeyboardTranslator.h:405
void writeHeader(const QString &description)
Writes the header for the keyboard translator.
Definition KeyboardTranslator.cpp:204
void writeEntry(const KeyboardTranslator::Entry &entry)
Writes a translator entry.
Definition KeyboardTranslator.cpp:208
KeyboardTranslatorWriter(QIODevice *destination)
Constructs a new writer which saves data into destination.
Definition KeyboardTranslator.cpp:193
Represents an association between a key sequence pressed by the user and the character sequence and c...
Definition KeyboardTranslator.h:124
Command command() const
Returns the commands associated with this entry.
Definition KeyboardTranslator.h:536
void setModifierMask(Qt::KeyboardModifiers modifiers)
See modifierMask() and modifiers()
Definition KeyboardTranslator.h:518
Qt::KeyboardModifiers modifierMask() const
Returns the keyboard modifiers which are valid in this entry.
Definition KeyboardTranslator.h:522
States state() const
Returns a bitwise-OR of the enabled state flags associated with this entry.
Definition KeyboardTranslator.h:572
void setModifiers(Qt::KeyboardModifiers modifiers)
See modifiers()
Definition KeyboardTranslator.h:509
int keyCode() const
Returns the character code ( from the Qt::Key enum ) associated with this entry.
Definition KeyboardTranslator.h:500
States stateMask() const
Returns the state flags which are valid in this entry.
Definition KeyboardTranslator.h:581
Qt::KeyboardModifiers modifiers() const
Returns a bitwise-OR of the enabled keyboard modifiers associated with this entry.
Definition KeyboardTranslator.h:513
void setKeyCode(int keyCode)
Sets the character code associated with this entry.
Definition KeyboardTranslator.h:504
void setCommand(Command command)
Sets the command associated with this entry.
Definition KeyboardTranslator.h:532
QByteArray text(bool expandWildCards=false, Qt::KeyboardModifiers modifiers=Qt::NoModifier) const
Returns the character sequence associated with this entry, optionally replacing wildcard '*' characte...
Definition KeyboardTranslator.h:549
void setText(const QByteArray &text)
Sets the character sequence associated with this entry.
Definition KeyboardTranslator.h:541
A convertor which maps between key sequences pressed by the user and the character strings which shou...
Definition KeyboardTranslator.h:53
QString name() const
Returns the name of this keyboard translator.
Definition KeyboardTranslator.cpp:817
Entry findEntry(int keyCode, Qt::KeyboardModifiers modifiers, States state=NoState) const
Looks for an entry in this keyboard translator which matches the given key code, keyboard modifiers a...
Definition KeyboardTranslator.cpp:842
QString description() const
Returns the descriptive name of this keyboard translator.
Definition KeyboardTranslator.cpp:809
static const Qt::KeyboardModifier CTRL_MOD
The modifier code for the actual Ctrl key on this OS.
Definition KeyboardTranslator.h:306
void replaceEntry(const Entry &existing, const Entry &replacement)
Replaces an entry in the translator.
Definition KeyboardTranslator.cpp:832
void setName(const QString &name)
Sets the name of this keyboard translator.
Definition KeyboardTranslator.cpp:813
State
The meaning of a particular key sequence may depend upon the state which the terminal emulation is in...
Definition KeyboardTranslator.h:63
@ AlternateScreenState
Indicates that the alternate screen ( typically used by interactive programs such as screen or vim ) ...
Definition KeyboardTranslator.h:83
@ AnyModifierState
Indicates that any of the modifier keys is active.
Definition KeyboardTranslator.h:85
@ ApplicationKeypadState
Indicates that the numpad is in application mode.
Definition KeyboardTranslator.h:87
QList< Entry > entries() const
Returns a list of all entries in the translator.
Definition KeyboardTranslator.cpp:822
Command
This enum describes commands which are associated with particular key sequences.
Definition KeyboardTranslator.h:94
@ NoCommand
Indicates that no command is associated with this command sequence.
Definition KeyboardTranslator.h:96
@ EraseCommand
Echos the operating system specific erase character.
Definition KeyboardTranslator.h:114
@ ScrollPageDownCommand
Scroll the terminal display down one page.
Definition KeyboardTranslator.h:102
@ ScrollDownToBottomCommand
Scroll the terminal display down to the end of history.
Definition KeyboardTranslator.h:112
@ ScrollUpToTopCommand
Scroll the terminal display up to the start of history.
Definition KeyboardTranslator.h:110
@ ScrollLineDownCommand
Scroll the terminal display down one line.
Definition KeyboardTranslator.h:106
KeyboardTranslator(const QString &name)
Constructs a new keyboard translator with the given name.
Definition KeyboardTranslator.cpp:800
void setDescription(const QString &description)
Sets the descriptive name of this keyboard translator.
Definition KeyboardTranslator.cpp:805
void addEntry(const Entry &entry)
Adds an entry to this keyboard translator's table.
Definition KeyboardTranslator.cpp:827
void removeEntry(const Entry &entry)
Removes an entry from the table.
Definition KeyboardTranslator.cpp:838
typedef KeyboardModifiers
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.