Daanv z
Daanv z

Reputation: 393

Using the Robot class in Java to simulate "Fn" key press

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.

Upvotes: 3

Views: 3203

Answers (1)

The Law
The Law

Reputation: 334

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.

Upvotes: 5

Related Questions