mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-11 06:05:08 +08:00
Fixed win32 config saving, keyboard mapping, and AltGr bugs.
Made extensive changes to the launcher to provide more control over setting up auto-start and it now saves configuration to the user's documents directory if auto-starting at login and saves to the system directory if auto-starting at boot. Replaced MapVirtualKey() with table lookup to work around that function's lack of support for extended keyboard scan codes. Added first cut at support for AltGr.
This commit is contained in:
@@ -459,6 +459,7 @@ CMSWindowsSecondaryScreen::updateKeys()
|
||||
if ((m_keys[VK_SCROLL] & 0x01) != 0) {
|
||||
m_mask |= KeyModifierScrollLock;
|
||||
}
|
||||
// note -- do not save KeyModifierModeSwitch in m_mask
|
||||
log((CLOG_DEBUG2 "modifiers on update: 0x%04x", m_mask));
|
||||
}
|
||||
|
||||
@@ -634,6 +635,11 @@ CMSWindowsSecondaryScreen::mapKey(Keystrokes& keys, UINT& virtualKey,
|
||||
KeyModifierAlt |
|
||||
KeyModifierMeta));
|
||||
|
||||
// set control and alt if mode shift (AltGr) is requested
|
||||
if ((mask & KeyModifierModeSwitch) != 0) {
|
||||
outMask |= KeyModifierControl | KeyModifierAlt;
|
||||
}
|
||||
|
||||
// extract extended key flag
|
||||
const bool isExtended = ((virtualKey & 0x100) != 0);
|
||||
virtualKey &= ~0x100;
|
||||
|
||||
Reference in New Issue
Block a user