如何使用C / C获得NUM LOCK状态++? [英] How to get a num lock state using C/C++?

查看:151
本文介绍了如何使用C / C获得NUM LOCK状态++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了GDK论坛链接,说,自从3.0版本越来越NUM LOCK状态API实现的。但是我使用2.4版本,当我需要支持较低的Linux版本的,我不能更新到3.0版本。这里是讨论链接:

I have read Gdk forum link which says that getting num lock state api is implemented since version 3.0. But I am using version 2.4 and I cannot update to version 3.0 as I need to support lower Linux version. Here is the discussion link:

http://mail.gnome.org/archives/提交名单/ 2010年7月/ msg00259.html

那么,有没有任何其他方式使用内部的Linux命令得到的Num Lock状态?

SO, is there any other way to get the num lock state using internal Linux command?

问候,
iSight摄像头

Regards, iSight

推荐答案

我已经检查了硬制品键code。每当num lock模式和pressed在数字键盘的数字键我比较硬制品键code这是普遍不变的所有制造商。因此,我并不需要使用ioctl.h头。

I have checked the hard ware key code. Whenever num lock is on and pressed the number key at num pad i compare the hard ware key code which is universally constant to all manufacturer. Hence, I don't need to use ioctl.h header.

这篇关于如何使用C / C获得NUM LOCK状态++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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