Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
KeyboardMap Struct Reference

Public Member Functions

void set (const QString &function, const QStringList &keys)
 KeyboardMap::set - set a given set of sequences to.
 
QStringList getFunctions () const
 KeyboardMap::getFunctions - return the functions.
 
void forEach (std::function< void(const QString &, const QStringList &)> fn) const
 KeyboardMap::forEach - helper function to iterate over the map.
 
void setKeyMapping (const QString &functionName, const QString &sequence)
 KeyboardMap::setKeyMapping - set a keyboard mapping.
 
void dumpMaps (const QString &tag) const
 

Static Public Member Functions

static KeyboardMap getFactoryMap ()
 KeyboardMap::getFactoryMap - return the hard-coded keyboard map.
 

Public Attributes

QString name
 
QList< Mappingmappings
 

Member Function Documentation

◆ forEach()

void KeyboardMap::forEach ( std::function< void(const QString &, const QStringList &)>  fn) const

KeyboardMap::forEach - helper function to iterate over the map.

Parameters
fn- a callback function to run

forEach iterates over the keyboard map and calls the passed function fn

◆ getFactoryMap()

KeyboardMap KeyboardMap::getFactoryMap ( )
static

KeyboardMap::getFactoryMap - return the hard-coded keyboard map.

Returns
a KeyboardMap containing the hard-coded defaults

getFactoryMap returns the hard-coded default keyboard mapping, named 'Factory'.

◆ getFunctions()

QStringList KeyboardMap::getFunctions ( ) const

KeyboardMap::getFunctions - return the functions.

Returns
A list of functions used in the map

getFunctions returns a list of the functions used in the keyboard map

◆ set()

void KeyboardMap::set ( const QString &  function,
const QStringList &  keys 
)

KeyboardMap::set - set a given set of sequences to.

Parameters
function
keys

◆ setKeyMapping()

void KeyboardMap::setKeyMapping ( const QString &  functionName,
const QString &  symbolic 
)

KeyboardMap::setKeyMapping - set a keyboard mapping.

Parameters
functionName- the Q3270 function
symbolic- a string representing the key sequence

setKeyMapping sets the supplied symbolic key sequence to the function name in the the keyboard map. The key sequence symbolic is a normalized form like 'Ctrl+A', but also handles left Ctrl and right Ctrl independently of each other. A key sequence can only map to a single Q3270 function, so any sequence passed is removed from anywhere it appears in the map first.


The documentation for this struct was generated from the following files: