Merge "Handle stylus buttons and tool types."