summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorJS Deck <jsdeckerido@gmail.com>2025-08-04 16:29:39 -0300
committerGitHub <noreply@github.com>2025-08-04 21:29:39 +0200
commit2be309de1df5e4262175fbcc58e6dd8de4e0e6d3 (patch)
tree866629ba5a4b9b45d8720383e4332726444f3566 /src/config
parent6491bb4fb7c7e86d9168a104d5b87ace4e1b978d (diff)
virtualkeyboard: Add options to skip releasing pressed keys on close and to skip sharing key states (#11214)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/ConfigDescriptions.hpp23
-rw-r--r--src/config/ConfigManager.cpp5
2 files changed, 28 insertions, 0 deletions
diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp
index 852a86d0..aeff3906 100644
--- a/src/config/ConfigDescriptions.hpp
+++ b/src/config/ConfigDescriptions.hpp
@@ -677,6 +677,23 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
},
/*
+ * input:virtualkeyboard:
+ */
+
+ SConfigOptionDescription{
+ .value = "input:virtualkeyboard:share_states",
+ .description = "Unify key down states and modifier states with other keyboards",
+ .type = CONFIG_OPTION_BOOL,
+ .data = SConfigOptionDescription::SBoolData{false},
+ },
+ SConfigOptionDescription{
+ .value = "input:virtualkeyboard:release_pressed_on_close",
+ .description = "Release all pressed keys by virtual keyboard on close.",
+ .type = CONFIG_OPTION_BOOL,
+ .data = SConfigOptionDescription::SBoolData{false},
+ },
+
+ /*
* input:tablet:
*/
@@ -1151,6 +1168,12 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
.data = SConfigOptionDescription::SBoolData{false},
},
SConfigOptionDescription{
+ .value = "misc:name_vk_after_proc",
+ .description = "Name virtual keyboards after the processes that create them. E.g. /usr/bin/fcitx5 will have hl-virtual-keyboard-fcitx5.",
+ .type = CONFIG_OPTION_BOOL,
+ .data = SConfigOptionDescription::SBoolData{true},
+ },
+ SConfigOptionDescription{
.value = "misc:always_follow_on_dnd",
.description = "Will make mouse focus follow the mouse when drag and dropping. Recommended to leave it enabled, especially for people using focus follows mouse at 0.",
.type = CONFIG_OPTION_BOOL,
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index d49add0e..337682dc 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -473,6 +473,7 @@ CConfigManager::CConfigManager() {
registerConfigVar("misc:vrr", Hyprlang::INT{0});
registerConfigVar("misc:mouse_move_enables_dpms", Hyprlang::INT{0});
registerConfigVar("misc:key_press_enables_dpms", Hyprlang::INT{0});
+ registerConfigVar("misc:name_vk_after_proc", Hyprlang::INT{1});
registerConfigVar("misc:always_follow_on_dnd", Hyprlang::INT{1});
registerConfigVar("misc:layers_hog_keyboard_focus", Hyprlang::INT{1});
registerConfigVar("misc:animate_manual_resizes", Hyprlang::INT{0});
@@ -662,6 +663,8 @@ CConfigManager::CConfigManager() {
registerConfigVar("input:touchdevice:transform", Hyprlang::INT{-1});
registerConfigVar("input:touchdevice:output", {"[[Auto]]"});
registerConfigVar("input:touchdevice:enabled", Hyprlang::INT{1});
+ registerConfigVar("input:virtualkeyboard:share_states", Hyprlang::INT{0});
+ registerConfigVar("input:virtualkeyboard:release_pressed_on_close", Hyprlang::INT{0});
registerConfigVar("input:tablet:transform", Hyprlang::INT{0});
registerConfigVar("input:tablet:output", {STRVAL_EMPTY});
registerConfigVar("input:tablet:region_position", Hyprlang::VEC2{0, 0});
@@ -797,6 +800,8 @@ CConfigManager::CConfigManager() {
m_config->addSpecialConfigValue("device", "flip_y", Hyprlang::INT{0}); // only for touchpads
m_config->addSpecialConfigValue("device", "drag_3fg", Hyprlang::INT{0}); // only for touchpads
m_config->addSpecialConfigValue("device", "keybinds", Hyprlang::INT{1}); // enable/disable keybinds
+ m_config->addSpecialConfigValue("device", "share_states", Hyprlang::INT{0}); // only for virtualkeyboards
+ m_config->addSpecialConfigValue("device", "release_pressed_on_close", Hyprlang::INT{0}); // only for virtualkeyboards
m_config->addSpecialCategory("monitorv2", {.key = "output"});
m_config->addSpecialConfigValue("monitorv2", "disabled", Hyprlang::INT{0});