Molybden API
Loading...
Searching...
No Matches
global_shortcuts.hpp
1// Copyright (c) 2000-2024 TeamDev Ltd. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_GLOBAL_SHORTCUTS_HPP
6#define MOLYBDEN_GLOBAL_SHORTCUTS_HPP
7
8#include <functional>
9
10#include "molybden/shortcuts/shortcut.hpp"
11
12namespace molybden {
13
22 public:
38 virtual bool registerShortcut(
39 const Shortcut& shortcut,
40 std::function<void(const Shortcut&)> handler) = 0;
41
50 virtual void unregisterShortcut(const Shortcut& shortcut) = 0;
51
52 virtual ~GlobalShortcuts() = default;
53};
54
55} // namespace molybden
56
57#endif //MOLYBDEN_GLOBAL_SHORTCUTS_HPP
Allows handling global keyboard shortcuts in the application.
Definition global_shortcuts.hpp:21
virtual void unregisterShortcut(const Shortcut &shortcut)=0
Unregisters a previously registered shortcut.
virtual bool registerShortcut(const Shortcut &shortcut, std::function< void(const Shortcut &)> handler)=0
Registers a global shortcut along with a handler function to be executed when the shortcut is activat...
A combination of a key code and modifier keys, such as Shift, Alt, etc.
Definition shortcut.hpp:25