mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 06:48:35 -05:00
Add Lua functions to query keyboard bindings and remove individual keybinds
Add core script file that defines possibility of rebinding keyboard commands to a different key Enable the execution of global customization scripts Make `scene_helper.lua` a script automatically included in the ScriptScheduler
This commit is contained in:
@@ -40,6 +40,15 @@ namespace openspace::interaction {
|
||||
|
||||
class KeyBindingManager : public DocumentationGenerator {
|
||||
public:
|
||||
using IsLocalBind = ghoul::Boolean;
|
||||
using IsSynchronized = ghoul::Boolean;
|
||||
|
||||
struct KeyInformation {
|
||||
std::string command;
|
||||
IsSynchronized synchronization;
|
||||
std::string documentation;
|
||||
};
|
||||
|
||||
KeyBindingManager();
|
||||
~KeyBindingManager() = default;
|
||||
|
||||
@@ -59,19 +68,17 @@ public:
|
||||
std::string documentation = ""
|
||||
);
|
||||
|
||||
void removeKeyBinding(const std::string& key);
|
||||
|
||||
std::vector<std::pair<KeyWithModifier, KeyInformation>> keyBinding(
|
||||
const std::string& key) const;
|
||||
|
||||
static scripting::LuaLibrary luaLibrary();
|
||||
|
||||
// Callback functions
|
||||
void keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
|
||||
|
||||
private:
|
||||
using Synchronized = ghoul::Boolean;
|
||||
|
||||
struct KeyInformation {
|
||||
std::string command;
|
||||
Synchronized synchronization;
|
||||
std::string documentation;
|
||||
};
|
||||
|
||||
std::string generateJson() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user