Also make the right option key working as a S&T key.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42506 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2011-07-27 03:24:53 +00:00
parent a956672a33
commit e4228c3760
@@ -115,10 +115,15 @@ StackAndTile::WindowRemoved(Window* window)
bool
StackAndTile::KeyPressed(uint32 what, int32 key, int32 modifiers)
{
// switch to and from stacking and snapping mode
if (what == B_MODIFIERS_CHANGED) {
const int32 kRightOptionKey = 103;
if (what == B_MODIFIERS_CHANGED
|| (what == B_UNMAPPED_KEY_DOWN && key == kRightOptionKey)
|| (what == B_UNMAPPED_KEY_UP && key == kRightOptionKey)) {
// switch to and from stacking and snapping mode
bool wasPressed = fSATKeyPressed;
fSATKeyPressed = modifiers & B_OPTION_KEY;
fSATKeyPressed = (what == B_MODIFIERS_CHANGED
&& modifiers & B_OPTION_KEY)
|| (what == B_UNMAPPED_KEY_DOWN && key == kRightOptionKey);
if (wasPressed && !fSATKeyPressed)
_StopSAT();
if (!wasPressed && fSATKeyPressed)