From 497b48e8520e4beac16a1a209551c3db46a6d917 Mon Sep 17 00:00:00 2001 From: ArchSav <96357545+ArchSav@users.noreply.github.com> Date: Wed, 6 May 2026 01:30:19 +1000 Subject: config: add device tags (#13728) --------- Co-authored-by: Mio Argillander --- src/managers/input/InputManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 65a98181..85699b14 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1167,6 +1167,10 @@ void CInputManager::applyConfigToKeyboard(SP pKeyboard) { const auto ENABLED = HASCONFIG && Config::mgr()->deviceConfigExplicitlySet(devname, "enabled") ? Config::mgr()->getDeviceInt(devname, "enabled") : true; const auto ALLOWBINDS = HASCONFIG && Config::mgr()->deviceConfigExplicitlySet(devname, "keybinds") ? Config::mgr()->getDeviceInt(devname, "keybinds") : true; + for (const auto& tagString : CVarList2(Config::mgr()->getDeviceString(devname, "tags"))) { + pKeyboard->m_deviceTags.emplace(std::string_view(tagString)); + } + pKeyboard->m_enabled = ENABLED; pKeyboard->m_resolveBindsBySym = RESOLVEBINDSBYSYM; pKeyboard->m_allowBinds = ALLOWBINDS; @@ -1293,6 +1297,10 @@ void CInputManager::setPointerConfigs() { g_pPointerManager->detachPointer(m); m->m_connected = false; } + + for (const auto tagString : CVarList2(Config::mgr()->getDeviceString(devname, "tags"))) { + m->m_deviceTags.emplace(std::string_view(tagString)); + } } if (Config::mgr()->deviceConfigExplicitlySet(devname, "scroll_factor")) -- cgit v1.2.3