qt从代码设置QWSServer keymap [英] qt setting QWSServer keymap from code

查看:515
本文介绍了qt从代码设置QWSServer keymap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要嵌入式QWSServer应用程序的键盘图。

I need to a keymap for my embedded QWSServer application.

使用这样的环境变量

QWS_KEYBOARD="TTY:keymap=/german_keyboard.qmap"
export QWS_KEYBOARD

工作,但对我来说不是最佳的。

works, but isn't optimal for me.

我尝试使用

QWSServer* wsServer = QWSServer::instance();
QWSKeyboardHandler * kh = QKbdDriverFactory::create("TTY", "keymap=/german_keymap.qmap");
wsServer->setKeyboardHandler(kh);

如上所述这里

但是,它不工作。任何想法如何解决?

However, it is not working. Any ideas how to fix it?

推荐答案

它实际上看起来像你不能做到。根据手册页,您只能设置驱动程序和设备键盘处理程序,但没有其他选项,如键盘映射。
这个的关键字映射事情只有环境变量的方式也提到了。

It actually looks like you couldn't do it. According to this manual page you can only set the driver and device for a keyboard handler, but no additional options like keymap. In this arcticle about the keymap thing only the environment variable way ist mentioned, too.

正因为如此,答案这里似乎是错误的。

Because of this, the answer here seems to be wrong.

小心:根据此答案< a>,Qt5没有QWS,所有QWS相关的API都已被删除。

Beware: According to this answer, Qt5 doesn't have QWS and all QWS-related APIs have been removed.

这篇关于qt从代码设置QWSServer keymap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆