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:
@@ -115,10 +115,15 @@ StackAndTile::WindowRemoved(Window* window)
|
|||||||
bool
|
bool
|
||||||
StackAndTile::KeyPressed(uint32 what, int32 key, int32 modifiers)
|
StackAndTile::KeyPressed(uint32 what, int32 key, int32 modifiers)
|
||||||
{
|
{
|
||||||
// switch to and from stacking and snapping mode
|
const int32 kRightOptionKey = 103;
|
||||||
if (what == B_MODIFIERS_CHANGED) {
|
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;
|
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)
|
if (wasPressed && !fSATKeyPressed)
|
||||||
_StopSAT();
|
_StopSAT();
|
||||||
if (!wasPressed && fSATKeyPressed)
|
if (!wasPressed && fSATKeyPressed)
|
||||||
|
|||||||
Reference in New Issue
Block a user