Customizing Shortcuts Definition #63
-
When i look at the F1 key, it is predefined with weston-terminal ( ),If i want to re-define it with my terminal application, which way is the proper way of doing it? By the way, i am using Louvre core library, just curious why keyboard definitions are embed in the core library? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
I forked my project from loure-views, i defined the key in Keyboard.cpp but it also triggers core definition, my terminal app and weston-terminal are opening at the same time when i press F1 :) i would like to modify without hacking the core lib. |
Beta Was this translation helpful? Give feedback.
-
Louvre View should have disabled F1 key from this from this: https://github.com/CuarzoSoftware/Louvre/blob/main/src/examples/louvre-views/src/Keyboard.cpp This is weird, definitely needs more investigating. |
Beta Was this translation helpful? Give feedback.
-
There are custom flags you can pass to LScene event handlers. Check LScene::handleKeyboardKeyEvent(), so you don't have to write it yourself. By default, all are set. In this case, you should remove the AuxFunc flag. scene.handleKeyboardKeyEvent(event, LScene::WaylandEvents); Keep in mind that other shortcuts, such as exiting the compositor with Here is the default implementation: LKeyboard::keyEvent() |
Beta Was this translation helpful? Give feedback.
-
I think this detail should be added to the base tutorial/documentation. |
Beta Was this translation helpful? Give feedback.
-
It is https://github.com/CuarzoSoftware/LouvreTemplate/blob/main/src/utils/Settings.h |
Beta Was this translation helpful? Give feedback.
-
Sorry, i could not follow how can i overwriting the F1 key binding by using |
Beta Was this translation helpful? Give feedback.
-
You need to explicitly set |
Beta Was this translation helpful? Give feedback.
There are custom flags you can pass to LScene event handlers. Check LScene::handleKeyboardKeyEvent(), so you don't have to write it yourself.
By default, all are set. In this case, you should remove the AuxFunc flag.
Keep in mind that other shortcuts, such as exiting the compositor with
Ctrl + Shift + Esc
, will also be disabled.Here is the default implementation: LKeyboard::keyEvent()