返回介绍

QWSKeyboardHandler Class

发布于 2019-10-04 15:04:13 字数 2263 浏览 1032 评论 0 收藏 0

The QWSKeyboardHandler class implements the keyboard driver/handler for Qt/Embedded. More...

#include <qkeyboard_qws.h>

Inherits QObject.

List of all member functions.

Public Members

  • QWSKeyboardHandler ()
  • virtual ~QWSKeyboardHandler ()

Protected Members

  • virtual void processKeyEvent ( intunicode, intkeycode, intmodifiers, boolisPress, boolautoRepeat )

Detailed Description

The QWSKeyboardHandler class implements the keyboard driver/handler for Qt/Embedded.

The keyboard handler (driver) handles events from system devices and generates key events.

A QWSKeyboardHandler will usually open some system device in its constructor, create a QSocketNotifier on that opened device and when it receives data, it will call processKeyEvent() to send the event to Qt/Embedded for relaying to clients.

See also Qt/Embedded.


Member Function Documentation

QWSKeyboardHandler::QWSKeyboardHandler ()

Constructs a keyboard handler. The handler may be passed to the system for later destruction with QWSServer::setKeyboardHandler(), although even without doing this, the handler can function, calling processKeyEvent() to emit events.

QWSKeyboardHandler::~QWSKeyboardHandler () [virtual]

Destroys a keyboard handler. Note that if you have called QWSServer::setKeyboardHandler(), you may not delete the handler.

void QWSKeyboardHandler::processKeyEvent ( intunicode, intkeycode, intmodifiers, boolisPress, boolautoRepeat ) [virtual protected]

Subclasses call this function to send a key event. The server may additionally filter the event before sending it on to applications.

  • unicode is the Unicode value for the key, or 0xFFFF is none is appropriate.
  • keycode is the Qt keycode for the key (see Qt::Key). for the list of codes).
  • modifiers is the set of modifier keys (see Qt::Modifier).
  • isPress says whether this is a press or a release.
  • autoRepeat says whether this event was generated by an auto-repeat mechanism, or an actual key press.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文