22#include <com/sun/star/container/NoSuchElementException.hpp>
45 lKeys.push_back(key2Command.first);
58 rKeyList.push_back(aKey);
63 TCommand2Keys::const_iterator pCommand =
m_lCommand2Keys.find(sCommand);
65 throw css::container::NoSuchElementException();
66 return pCommand->second;
73 throw css::container::NoSuchElementException();
87 OUString sCommand = pKey->second;
100 if (lKeys.size() == 1)
105 auto pKeys = ::std::find(lKeys.begin(), lKeys.end(), aKey);
107 if (pKeys != lKeys.end())
115 for (
auto const& lKey : lKeys)
TKey2Commands m_lKey2Commands
map keys to commands in relation 1:1.
TKeyList getAllKeys() const
TKeyList getKeysByCommand(const OUString &sCommand) const
returns the list of keys, which are registered for this command.
void setKeyCommandPair(const css::awt::KeyEvent &aKey, const OUString &sCommand)
add a new or change an existing key-command pair of this container.
::std::vector< css::awt::KeyEvent > TKeyList
commands -> keys
void removeCommand(const OUString &sCommand)
bool hasCommand(const OUString &sCommand) const
OUString getCommandByKey(const css::awt::KeyEvent &aKey) const
void removeKey(const css::awt::KeyEvent &aKey)
bool hasKey(const css::awt::KeyEvent &aKey) const
checks if the specified key exists.
TCommand2Keys m_lCommand2Keys
map commands to keys in relation 1:n.