Type Definition gilrs::NativeEvCode
[−]
[src]
type NativeEvCode = u16;
Platform specific event code.
Meaning of specific codes can vary not only between platforms but also between different devices. Context is also important - axis with code 2 is something totally different than button with code 2.
DPad is often represented as 2 axis, not 4 buttons. So if you get event (0, Button::DPadDown, 4)
, you can not be sure if 4 is button or axis. On Linux you can assume that
if event code is smaller than 0x100 it's either keyboard key or axis.