#ifndef __SHIFTS_H__
#define __SHIFTS_H__

/* Macros for accessing bytes */
#define MATCH_ALL(x, y)		(((x) & (y)) == (y))
#define MATCH_ANY(x, y)		(((x) & (y)) != 0)
#define MATCH_NONE(x, y)	(((x) & (y)) == 0)

/* Masks for accessing shift states */
#define	MASK_NONE			0x0
#define MASK_RSHIFT			0x1
#define MASK_LSHIFT			0x2
#define MASK_CTRL			0x4
#define MASK_ALT			0x8
#define MASK_SCROLL_LOCK	0x10
#define MASK_NUM_LOCK		0x20
#define MASK_CAPS_LOCK		0x40
#define MASK_INSERT			0x80
#define MASK_LCTRL			0x100
#define MASK_LALT			0x200
#define MASK_RCTRL			0x400
#define MASK_RALT			0x800
#define MASK_SCROLL_PRESS	0x1000
#define MASK_NUM_PRESS		0x2000
#define MASK_CAPS_PRESS		0x4000
#define MASK_SYSRQ_PRESS	0x8000

#endif

/* vim: set ts=4 cindent shiftwidth=4 tw=0 : */
