Input sub system button codes

bharathsm

New Member
Joined
Apr 16, 2019
Messages
2
Reaction score
0
Credits
0
The input-event-codes.h contains multiple entries for FORWARD key,
1.#define KEY_FORWARD 159 /* AC Forward */
2. #define KEY_FASTFORWARD 208
3. #define BTN_FORWARD 0x115


Does these codes are intended for different purpose? If yes, What are those?
 
Last edited:


Which piece of software is input-event-codes.h from?
Is it the Linux Kernel? Or some other program?

It looks as if each one of those is a value of a particular key on the keyboard. Perhaps they refer to the multi-media/special function keys you get on some keyboards? e.g. the buttons that do things like launch the browser, browser back, browser forwards, browser refresh, quick screenshot, launch email client, launch webcam, multimedia playback keys etc. etc.

But again - without knowing which piece of software this header file is from, it's difficult to say exactly what it is for!
 
Hi JasKinasis,

Thanks.
The input-event-codes.h belongs to Linux kernel input subsystem. File present in include/*/linux/input-event-codes.h.
These codes are used by input device drivers and user interface applications. Input device drivers uses codes to pass information received from user actions (on input devices eg: keyboard) to application layer.
 
Ok, after taking a look at the source code for the latest stable version of the kernel, it looks as if my original guess was pretty much on the money.

Those #define'd values relate to various special keys on the keyboard

KEY_FORWARD - refers to a special media key on some keyboards which triggers the same action as your browsers forward button (to go forward through the browsers history)

KEY_FASTFORWARD - is definitely the fast forward button. So this is another special media playback/transport key. If you have one of these on your keyboard, it will cause you to fast-forward a media file that is playing (music/video).

BTN_FORWARD - refers to the forward button on a mouse. Some mice have extra buttons on them - e.g. a gamers mouse. The forward button on the mouse is usually connected to the browser and can be used to navigate forwards through the browsers history. So it performs exactly the same function as KEY_FORWARD, but it has it's own value, because this is a mouse button, not a key on the keyboard.

There are some other keys containing the word FORWARD:
KEY_FORWARDMAIL - is a special email related key available on some keyboards. It's name pretty much says what it should do.

KEY_FRAMEFORWARD - is another special media playback/transport key that will move through a media file (video/audio) one frame at a time.
 

Staff online

Members online


Latest posts

Top