From: Alan Cox Date: Sun, 15 Apr 2018 13:48:01 +0000 (+0100) Subject: input: add BUTTON(n) define for the button byte X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bbfff6b54c6007564bae10c17d8c3bca11f897ff;p=FUZIX.git input: add BUTTON(n) define for the button byte --- diff --git a/Kernel/include/input.h b/Kernel/include/input.h index 6c936d16..907b257c 100644 --- a/Kernel/include/input.h +++ b/Kernel/include/input.h @@ -13,8 +13,10 @@ bits show u/d and 3 spare bits */ #define KEYPRESS_DOWN 0x00 #define KEYPRESS_UP 0x01 +#define LIGHTPEN_ABS 0x50 /* Light pen or similar, 16 x 16bit virtual coords */ -#define BUTTONS(x) ((x)&0x0F) /* 1-4 buttons */ +#define BUTTON(x) (1 << (x)) /* Button 1-7 (top bit never used) */ +#define BUTTONS(x) ((x)&0x07) /* 0-7 buttons */ #define INPUT_GRABKB 0x0520