4#ifndef INCLUDE_FIFECHAN_SHORTCUT_HPP_
5#define INCLUDE_FIFECHAN_SHORTCUT_HPP_
12#include "fifechan/platform.hpp"
15#include "fifechan/key.hpp"
83 explicit Shortcut(Key key, uint16_t modMask = Modifier::None);
uint16_t mModMask
Bitmask of Modifier flags.
bool conflicts(Shortcut const &other) const
Checks for collision with another shortcut.
std::string to_string() const
Returns a human-readable string, e.g.
bool operator==(Shortcut const &other) const
Compares two shortcuts for equality (same key + same mods).
static Shortcut fromKeycode(uint32_t keycode, uint16_t sdlMods=0)
Creates a Shortcut from a raw SDL keycode + SDL modifier mask.
Key mKey
The semantic key.
bool operator!=(Shortcut const &other) const
Compares two shortcuts for inequality.
bool matches(KeyEvent const &event) const
Compares the shortcut to a KeyEvent.
Shortcut()=default
Default constructor creates an unbound shortcut (key 0, no mods).
Key getKey() const
Gets the semantic key.
uint16_t getModMask() const
Gets the modifier bitmask.
Used replacement tokens by configure_file():