• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • util
kkeyserver_x11.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
3
4 Win32 port:
5 Copyright (C) 2004 Jarosław Staniek <staniek@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef _KKEYSERVER_X11_H
24#define _KKEYSERVER_X11_H
25
26#include "kshortcut.h"
27#include <X11/Xlib.h>
28#include <fixx11h.h>
29
30namespace KKeyServer
31{
32 static const int MODE_SWITCH = 0x2000;
33
38 KDEUI_EXPORT bool initializeMods();
39
46 KDEUI_EXPORT bool keyboardHasMetaKey();
47
53 KDEUI_EXPORT uint modXShift();
54
60 KDEUI_EXPORT uint modXLock();
61
67 KDEUI_EXPORT uint modXCtrl();
68
74 KDEUI_EXPORT uint modXAlt();
75
82 KDEUI_EXPORT uint modXMeta();
83
89 KDEUI_EXPORT uint modXNumLock();
90
96 KDEUI_EXPORT uint modXScrollLock();
97
103 KDEUI_EXPORT uint modXModeSwitch();
104
116 KDEUI_EXPORT uint accelModMaskX();
117
125 KDEUI_EXPORT bool keyQtToSymX( int keyQt, int* sym );
126
133 KDEUI_EXPORT bool keyQtToCodeX( int keyQt, int* keyCode );
134
142 KDEUI_EXPORT bool keyQtToModX( int keyQt, uint* mod );
143
150 KDEUI_EXPORT bool symXToKeyQt( uint sym, int* keyQt );
151
160 KDEUI_EXPORT bool modXToQt( uint modX, int* modQt );
161
169 KDEUI_EXPORT bool xEventToQt( XEvent* e, int* keyModQt );
170}
171
172#endif // !_KKEYSERVER_X11_H
fixx11h.h
kshortcut.h
Defines platform-independent classes for keyboard shortcut handling.
KKeyServer
A collection of functions for the conversion of key presses and their modifiers from the window syste...
Definition: kkeyserver.cpp:31
KKeyServer::modXModeSwitch
uint modXModeSwitch()
Returns the X11 Mode_switch modifier mask/flag.
Definition: kkeyserver_x11.cpp:650
KKeyServer::modXMeta
uint modXMeta()
Returns the X11 Win (Mod3) modifier mask/flag.
Definition: kkeyserver_x11.cpp:645
KKeyServer::symXToKeyQt
bool symXToKeyQt(uint keySym, int *keyQt)
Converts the given symbol to a Qt key code.
Definition: kkeyserver_x11.cpp:730
KKeyServer::xEventToQt
bool xEventToQt(XEvent *e, int *keyQt)
Converts an X keypress event into a Qt key + modifier code.
Definition: kkeyserver_x11.cpp:817
KKeyServer::keyboardHasMetaKey
bool keyboardHasMetaKey()
Returns true if the current keyboard layout supports the Meta key.
Definition: kkeyserver_x11.cpp:652
KKeyServer::MODE_SWITCH
static const int MODE_SWITCH
Definition: kkeyserver_x11.h:32
KKeyServer::modXShift
uint modXShift()
Returns the X11 Shift modifier mask/flag.
Definition: kkeyserver_x11.cpp:642
KKeyServer::modXNumLock
uint modXNumLock()
Returns the X11 NumLock modifier mask/flag.
Definition: kkeyserver_x11.cpp:647
KKeyServer::keyQtToCodeX
bool keyQtToCodeX(int keyQt, int *keyCode)
Extracts the code from the given Qt key.
Definition: kkeyserver_x11.cpp:686
KKeyServer::modXToQt
bool modXToQt(uint modX, int *modQt)
Converts the mask of ORed X11 modifiers to a mask of ORed Qt key code modifiers.
Definition: kkeyserver_x11.cpp:777
KKeyServer::modXLock
uint modXLock()
Returns the X11 Lock modifier mask/flag.
Definition: kkeyserver_x11.cpp:648
KKeyServer::keyQtToSymX
bool keyQtToSymX(int keyQt, int *keySym)
Extracts the symbol from the given Qt key and converts it to an X11 symbol + modifiers.
Definition: kkeyserver_x11.cpp:706
KKeyServer::accelModMaskX
uint accelModMaskX()
Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available).
Definition: kkeyserver_x11.cpp:811
KKeyServer::modXAlt
uint modXAlt()
Returns the X11 Alt (Mod1) modifier mask/flag.
Definition: kkeyserver_x11.cpp:644
KKeyServer::modXScrollLock
uint modXScrollLock()
Returns the X11 ScrollLock modifier mask/flag.
Definition: kkeyserver_x11.cpp:649
KKeyServer::initializeMods
bool initializeMods()
Initialises the values to return for the mod*() functions below.
Definition: kkeyserver_x11.cpp:498
KKeyServer::keyQtToModX
bool keyQtToModX(int modQt, uint *modX)
Extracts the modifiers from the given Qt key and converts them in a mask of X11 modifiers.
Definition: kkeyserver_x11.cpp:757
KKeyServer::modXCtrl
uint modXCtrl()
Returns the X11 Ctrl modifier mask/flag.
Definition: kkeyserver_x11.cpp:643
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal