Finding the scan code of FN Key

不羁岁月 提交于 2020-01-13 08:15:13

问题


I want to use Fn+S to emulate Ctrl+S, so far this is my code:

 #InstallKeybdHook
 #Persistent

  SC126 & s::
     Send ^{s}
  return

My problem is that I don't know the Fn key's scan code.
How can I find it?


回答1:


The Fn key does not have a scan code.

The keyboard driver does not expose the Fn key to the operating system, so basically your operating system (and therefore AutoHotkey) does not know that it exists.

When you press the Fn key in combination with a supported key, the keyboard driver reports a single key press to the operating system with a different scan code. Basically, it tells the operating system that a different key was pressed.




回答2:


When you press the Fn key in combination with a supported key, the keyboard driver reports the presses to the operating system.

You can find the fn key scan code

  1. Go to tray icon
  2. Right click script
  3. Click open
  4. Click view and then key history and script info ( alternatively "Ctrl + k")
  5. Once you press the key you can refresh (f5) and scroll to bottom to see the codes




回答3:


If you're trying to use a Mac keyboard and would like to map the Fn key to Insert (and also get other standard Windows keys, like PrintScreen), then you might want to try the 'hidfalum' driver. It's available here: http://www.bimoid.com/download/utils/hidfalum.zip



来源:https://stackoverflow.com/questions/24423724/finding-the-scan-code-of-fn-key

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!