Added bit handling for mouse buttons 1 to 6