Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
XDGKeyUtil.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
5 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
6 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7 */
8
9#pragma once
10
11#include <array>
12#include <cstdint>
13#include <map>
14
15using KeySym = unsigned long;
16using KeySymMap = std::map<KeySym, uint32_t>;
17
20{
21
22public:
24
28 static uint32_t mapKeySymToKeyID(KeySym);
29
31
35 static uint32_t getModifierBitForKeySym(KeySym keysym);
36
37private:
38 static const KeySymMap s_keySymToUCS4;
39 // map "Internet" keys to KeyIDs
40 static const std::array<KeySym, 256> s_map1008FF;
41};
static long
Definition ArchNetworkWinsock.cpp:54
unsigned long KeySym
Definition XDGKeyUtil.h:15
std::map< KeySym, uint32_t > KeySymMap
Definition XDGKeyUtil.h:16
XKB utility functions.
Definition XDGKeyUtil.h:20
static uint32_t getModifierBitForKeySym(KeySym keysym)
Convert KeySym to corresponding KeyModifierMask.
Definition XDGKeyUtil.cpp:105
static uint32_t mapKeySymToKeyID(KeySym)
Convert KeySym to KeyID.
Definition XDGKeyUtil.cpp:15