如何在 Windows 上按 Fn + 功能键? [英] How to press the Fn + function keys on Windows?

查看:49
本文介绍了如何在 Windows 上按 Fn + 功能键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以前的脚本中,我已经能够使用 SendKeys 方法在我的计算机上按下非字母键,如下所示来模拟静音,WshShell.SendKeys(chr(&hAD)).

In previous scripts, I have been able to use the SendKeys method to press non-alphabetic keys on my computer like the following to simulate muting, WshShell.SendKeys(chr(&hAD)).

但是,我似乎找不到模拟按下 Fn 和任何 F1-F12 键的能力.我正在尝试专门按下降低屏幕亮度"键,即键盘上的 Fn+F11.

However, I cannot seem to find the ability to simulate pressing Fn and any of the F1-F12 keys. I am trying specifically to press the "Lower Screen Brightness" key, which is Fn+F11 on my keyboard.

如何实现?

推荐答案

笔记本电脑上的 Fn 键通常在硬件或驱动程序级别实现.请参阅:类似问题的答案:如何按 Fn+F11

The Fn keys on a laptop are usually implemented at the hardware or driver level. See: the answer to a similar question: How to press Fn+F11

您最好的办法是找到一种直接从操作系统执行操作的方法,而不是尝试按下就 Windows 而言不存在"的键.在屏幕亮度的情况下,还有其他方法可以做到这一点.此解决方案是用 C# 编写的,但如果您确实需要在 VBScript 中执行此操作,则可能会编写一个 COM 或 DLL 以处理它.

Your best bet is to find a method of performing the action directly from the OS rather than trying to press a key that doesn't 'exist' as far as Windows is concerned. In the case of screen brightness, there are other ways to do that. This solution is written in C# but if you really needed to do it in VBScript, you could potentially write a COM or DLL to handle it.

这篇关于如何在 Windows 上按 Fn + 功能键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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