Active Rotate

From ThinkWiki
Jump to: navigation, search

Active Rotate is a technology to automatically rotate the screen orientation based on the physical orientation of the tablet. It uses ACPI button event support for the event that it is being flipped down into tablet configuration, or up into laptop configuration. (On at least the X61 Tablet) there is an acpi status file that can be read to determine whether the machine is presently in laptop or tablet configuration. Once in tablet configuration, perhaps software that uses the same sensor as HDAPS could automatically reorient the display according to position --- landscape vs portrait mode --- in similar fashion to the display on the iPhone.

Models featuring this Technology

X200 Tablet

Done through acpi events.

I have two to define events:

/etc/acpi/events/thinkpad-swivel-down

event=ibm/hotkey HKEY 00000080 00005009
action=/etc/acpi/thinkpad-swivel-down.sh

/etc/acpi/events/thinkpad-swivel-up

event=ibm/hotkey HKEY 00000080 0000500a
action=/etc/acpi/thinkpad-swivel-up.sh

And two scripts which these events run:

/etc/acpi/thinkpad-swivel-down.sh

#!/bin/bash
/usr/bin/xrandr -o right 
xsetwacom set "stylus" Rotate cw
xsetwacom set "cursor" Rotate cw
xsetwacom set "eraser" Rotate cw

/etc/acpi/thinkpad-swivel-up.sh

#!/bin/bash
/usr/bin/xrandr -o normal
xsetwacom set "stylus" Rotate none
xsetwacom set "cursor" Rotate none
xsetwacom set "eraser" Rotate none

You can see the events when rotating with acpi_listen.

See Also