Difference between revisions of "Active Rotate"

From ThinkWiki
Jump to: navigation, search
 
(X200 Tablet)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
A technology to automatically rotate the screen orientation based on the physical orientation of the tablet. It uses the same sensor as [[HDAPS]]
+
'''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==
 +
*ThinkPad {{X60_Tablet}}, {{X61_Tablet}}, {{X200_Tablet}} (non-SSD)
 +
 
 +
==X200 Tablet==
 +
 
 +
Done through acpi events.
 +
 
 +
I have two to define events:
 +
 
 +
{{path|/etc/acpi/events/thinkpad-swivel-down}}
 +
 
 +
event=ibm/hotkey HKEY 00000080 00005009
 +
action=/etc/acpi/thinkpad-swivel-down.sh
 +
 
 +
{{path|/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:
 +
 
 +
{{path|/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
 +
 
 +
{{path|/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==
 +
*[https://code.edge.launchpad.net/~karl.hegbloom/tabuntu/tablet-screen-rotation-support Tablet Screen Rotation Support], part of the [https://edge.launchpad.net/tabuntu Tabuntu] project at [https://edge.launchpad.net Launchpad].
 +
 
 +
[[Category:Glossary]]

Latest revision as of 22:29, 20 February 2009

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