NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

Regarding test the key of keyboard with labview question

 

I want to test key of the keyboard with labview, I find the example " Basic Input Demo.vi", I try it then can test some key,

but have some function

key don't test, example ,Printscreen key, notebook Fn, etc.

I hear that each key has the keycode , can I read it ?

 

Do you help me to solve the question?

 

Tks and best regards!

Bright

 

 

 

0 项奖励
1 条消息(共 11 条)
5,408 次查看

Try this VI.

 

20369iE3178A950A040478

George Zou
0 项奖励
2 条消息(共 11 条)
5,395 次查看

Thanks for you information. but it don't read some function key, eg: Printscreen key etc,

0 项奖励
3 条消息(共 11 条)
5,376 次查看

Windows does not send any kind of key down message to the window when print screen is pressed. So maybe searching for some lower level Windows APIs will be a possible way.

0 项奖励
4 条消息(共 11 条)
5,327 次查看

Thanks, I hear that applying  windows dll and hook can solve the question, but I don't know how to use hook.

0 项奖励
5 条消息(共 11 条)
5,323 次查看

Hook is over kill.

Just poll it.

 

Take a look GetKeyState

George Zou
6 条消息(共 11 条)
5,293 次查看
Hi zou, I don't find GetKeyState file.
0 项奖励
7 条消息(共 11 条)
5,254 次查看

 I want to get key state and get function key state but don't action. eg, press Win flag key , start menu will to pop-up , I want to read the key state,but

start menu will not to pop-up.

0 项奖励
8 条消息(共 11 条)
5,253 次查看

GetKeyState is an WinAPI.  You can find it on msnd.

George Zou
0 项奖励
9 条消息(共 11 条)
5,237 次查看

@brightxie1 wrote:

 I want to get key state and get function key state but don't action. eg, press Win flag key , start menu will to pop-up , I want to read the key state, but start menu will not to pop-up.


You need hook.

 

Or you can close the pop-up window yourself.

 

George Zou
0 项奖励
10 条消息(共 11 条)
5,236 次查看