Input devices (whether physically present, or emulated) may produce any "kind" of input.
In other words there is no clear distinction between a keyboard and a mouse, other than the data they (i.e., their drivers) write to their corresponding /dev/input/eventX
file (where X is an integer).
That can be problematic sometimes, for example if a program in userspace consumes input data from a device and expects that data to only contain certain keycodes, event types, etc.
Another example could be a video game which displays different sprites/text when a gamepad is used instead of a keyboard, like key/button prompts in a tutorial or a settings menu.
Luckily, most devices only write a strict set of event types and codes to their eventX file, because well, most hardware is only a keyboard, or mouse, or gamepad, or touchscreen, etc. and not a wild combination.
The kernel calls these the input device's capabilities, as documented [here](ht
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// float32 | |
// Martin Kallman | |
// | |
// Fast half-precision to single-precision floating point conversion | |
// - Supports signed zero and denormals-as-zero (DAZ) | |
// - Does not support infinities or NaN | |
// - Few, partially pipelinable, non-branching instructions, | |
// - Core opreations ~6 clock cycles on modern x86-64 | |
void float32(float* __restrict out, const uint16_t in) { | |
uint32_t t1; |