问题
I'm trying to write a small program that makes the backlight of my laptop's keyboard flash whenever I receive an email/text/other type of message. I'm trying to use Java's Robot class to do this.
My problem so far is that I cannot seem to find the keycode for the "Fn" key.
回答1:
Java generally does not recognize multimedia key strokes (and Fn is generally considered non-standard keyboard key) as valid ones in its inbuilt libraries and will return 0 on non-standard keystroke event
.
But you can get your key by using Intellitype library for non-standard keys and also as possible work-around for the input.
来源:https://stackoverflow.com/questions/33286724/using-the-robot-class-in-java-to-simulate-fn-key-press