diff --git a/kwinbindings.cpp b/kwinbindings.cpp index caef47600b..6791c13540 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -1,13 +1,13 @@ #ifndef NOSLOTS -# define DEF2( name, descr, key3, key4, fnSlot ) \ - keys->insert( name, i18n(descr), QString::null, key3, key4, this, SLOT(fnSlot) ) -# define DEF( name, key3, key4, fnSlot ) \ - keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) ) +# define DEF2( name, descr, key, fnSlot ) \ + keys->insert( name, i18n(descr), QString::null, key, this, SLOT(fnSlot) ) +# define DEF( name, key, fnSlot ) \ + keys->insert( name, i18n(name), QString::null, key, this, SLOT(fnSlot) ) #else -# define DEF2( name, descr, key3, key4, fnSlot ) \ - keys->insert( name, i18n(descr), QString::null, key3, key4 ) -# define DEF( name, key3, key4, fnSlot ) \ - keys->insert( name, i18n(name), QString::null, key3, key4 ) +# define DEF2( name, descr, key, fnSlot ) \ + keys->insert( name, i18n(descr), QString::null, key ) +# define DEF( name, key, fnSlot ) \ + keys->insert( name, i18n(name), QString::null, key ) #endif #define WIN Qt::META @@ -21,92 +21,94 @@ keys->insert( "Program:kwin", i18n("System") ); keys->insert( "Group:Navigation", i18n("Navigation") ); - DEF( I18N_NOOP("Walk Through Windows"), ALT+Qt::Key_Tab, ALT+Qt::Key_Tab, slotWalkThroughWindows() ); - DEF( I18N_NOOP("Walk Through Windows (Reverse)"), ALT+SHIFT+Qt::Key_Tab, ALT+SHIFT+Qt::Key_Tab, slotWalkBackThroughWindows() ); - DEF( I18N_NOOP("Walk Through Desktops"), 0, WIN+Qt::Key_Tab, slotWalkThroughDesktops() ); - DEF( I18N_NOOP("Walk Through Desktops (Reverse)"), 0, WIN+SHIFT+Qt::Key_Tab, slotWalkBackThroughDesktops() ); - DEF( I18N_NOOP("Walk Through Desktop List"), 0, 0, slotWalkThroughDesktopList() ); - DEF( I18N_NOOP("Walk Through Desktop List (Reverse)"), 0, 0, slotWalkBackThroughDesktopList() ); + DEF( I18N_NOOP("Walk Through Windows"), ALT+Qt::Key_Tab, slotWalkThroughWindows() ); + DEF( I18N_NOOP("Walk Through Windows (Reverse)"), ALT+SHIFT+Qt::Key_Tab, slotWalkBackThroughWindows() ); + DEF( I18N_NOOP("Walk Through Desktops"), WIN+Qt::Key_Tab, slotWalkThroughDesktops() ); + DEF( I18N_NOOP("Walk Through Desktops (Reverse)"), WIN+SHIFT+Qt::Key_Tab, slotWalkBackThroughDesktops() ); + DEF( I18N_NOOP("Walk Through Desktop List"), 0, slotWalkThroughDesktopList() ); + DEF( I18N_NOOP("Walk Through Desktop List (Reverse)"), 0, slotWalkBackThroughDesktopList() ); keys->insert( "Group:Windows", i18n("Windows") ); DEF( I18N_NOOP("Window Operations Menu"), ALT+Qt::Key_F3, ALT+Qt::Key_Menu, slotWindowOperations() ); DEF2( "Window Close", I18N_NOOP("Close Window"), ALT+Qt::Key_F4, "Alt+Escape;Alt+F4", slotWindowClose() ); DEF2( "Window Maximize", I18N_NOOP("Maximize Window"), - 0, WIN+Qt::Key_Plus, slotWindowMaximize() ); + WIN+Qt::Key_Plus, slotWindowMaximize() ); DEF2( "Window Maximize Vertical", I18N_NOOP("Maximize Window Vertically"), - 0, WIN+Qt::Key_Bar, slotWindowMaximizeVertical() ); + WIN+Qt::Key_Bar, slotWindowMaximizeVertical() ); DEF2( "Window Maximize Horizontal", I18N_NOOP("Maximize Window Horizontally"), - 0, WIN+Qt::Key_Equal, slotWindowMaximizeHorizontal() ); + WIN+Qt::Key_Equal, slotWindowMaximizeHorizontal() ); DEF2( "Window Minimize", I18N_NOOP("Minimize Window"), - 0, WIN+Qt::Key_Minus, slotWindowMinimize() ); + WIN+Qt::Key_Minus, slotWindowMinimize() ); DEF2( "Window Shade", I18N_NOOP("Shade Window"), - 0, WIN+Qt::Key_Underscore, slotWindowShade() ); + WIN+Qt::Key_Underscore, slotWindowShade() ); DEF2( "Window Move", I18N_NOOP("Move Window"), - 0, 0, slotWindowMove() ); + 0, slotWindowMove() ); DEF2( "Window Resize", I18N_NOOP("Resize Window"), - 0, 0, slotWindowResize() ); + 0, slotWindowResize() ); DEF2( "Window Raise", I18N_NOOP("Raise Window"), - 0, 0, slotWindowRaise() ); + 0, slotWindowRaise() ); DEF2( "Window Lower", I18N_NOOP("Lower Window"), - 0, 0, slotWindowLower() ); - DEF( I18N_NOOP("Toggle Window Raise/Lower"), 0, 0, slotWindowRaiseOrLower() ); + 0, slotWindowLower() ); + DEF( I18N_NOOP("Toggle Window Raise/Lower"), 0, slotWindowRaiseOrLower() ); DEF2( "Window Fullscreen", I18N_NOOP("Make Window Fullscreen"), - 0, 0, slotWindowFullScreen() ); + 0, slotWindowFullScreen() ); DEF2( "Window No Border", I18N_NOOP("Hide Window Border"), - 0, 0, slotWindowNoBorder() ); + 0, slotWindowNoBorder() ); DEF2( "Window Above Other Windows", I18N_NOOP("Keep Window Above Others"), - 0, 0, slotWindowAbove() ); + 0, slotWindowAbove() ); DEF2( "Window Below Other Windows", I18N_NOOP("Keep Window Below Others"), - 0, 0, slotWindowBelow() ); - DEF( I18N_NOOP("Activate Window Demanding Attention"), CTRL+ALT+Qt::Key_A, 0, slotActivateAttentionWindow()); - DEF( I18N_NOOP("Setup Window Shortcut"), 0, 0, slotSetupWindowShortcut()); + 0, slotWindowBelow() ); + DEF( I18N_NOOP("Activate Window Demanding Attention"), + CTRL+ALT+Qt::Key_A, slotActivateAttentionWindow()); + DEF( I18N_NOOP("Setup Window Shortcut"), + 0, slotSetupWindowShortcut()); DEF2( "Window Pack Right", I18N_NOOP("Pack Window to the Right"), - 0, 0, slotWindowPackRight() ); + 0, slotWindowPackRight() ); DEF2( "Window Pack Left", I18N_NOOP("Pack Window to the Left"), - 0, 0, slotWindowPackLeft() ); + 0, slotWindowPackLeft() ); DEF2( "Window Pack Up", I18N_NOOP("Pack Window Up"), - 0, 0, slotWindowPackUp() ); + 0, slotWindowPackUp() ); DEF2( "Window Pack Down", I18N_NOOP("Pack Window Down"), - 0, 0, slotWindowPackDown() ); + 0, slotWindowPackDown() ); DEF2( "Window Grow Horizontal", I18N_NOOP("Pack Grow Window Horizontally"), - 0, 0, slotWindowGrowHorizontal() ); + 0, slotWindowGrowHorizontal() ); DEF2( "Window Grow Vertical", I18N_NOOP("Pack Grow Window Vertically"), - 0, 0, slotWindowGrowVertical() ); + 0, slotWindowGrowVertical() ); DEF2( "Window Shrink Horizontal", I18N_NOOP("Pack Shrink Window Horizontally"), - 0, 0, slotWindowShrinkHorizontal() ); + 0, slotWindowShrinkHorizontal() ); DEF2( "Window Shrink Vertical", I18N_NOOP("Pack Shrink Window Vertically"), - 0, 0, slotWindowShrinkVertical() ); + 0, slotWindowShrinkVertical() ); keys->insert( "Group:Window Desktop", i18n("Window & Desktop") ); DEF2( "Window On All Desktops", I18N_NOOP("Keep Window on All Desktops"), - 0, 0, slotWindowOnAllDesktops() ); - DEF( I18N_NOOP("Window to Desktop 1"), 0, WIN+ALT+Qt::Key_F1, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 2"), 0, WIN+ALT+Qt::Key_F2, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 3"), 0, WIN+ALT+Qt::Key_F3, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 4"), 0, WIN+ALT+Qt::Key_F4, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 5"), 0, WIN+ALT+Qt::Key_F5, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 6"), 0, WIN+ALT+Qt::Key_F6, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 7"), 0, WIN+ALT+Qt::Key_F7, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 8"), 0, WIN+ALT+Qt::Key_F8, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 9"), 0, WIN+ALT+Qt::Key_F9, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 10"), 0, WIN+ALT+Qt::Key_F10, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 11"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 12"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 13"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 14"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 15"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 16"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 17"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 18"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 19"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Desktop 20"), 0, 0, slotWindowToDesktop(int) ); - DEF( I18N_NOOP("Window to Next Desktop"), 0, 0, slotWindowToNextDesktop() ); - DEF( I18N_NOOP("Window to Previous Desktop"), 0, 0, slotWindowToPreviousDesktop() ); - DEF( I18N_NOOP("Window One Desktop to the Right"), 0, 0, slotWindowToDesktopRight() ); - DEF( I18N_NOOP("Window One Desktop to the Left"), 0, 0, slotWindowToDesktopLeft() ); - DEF( I18N_NOOP("Window One Desktop Up"), 0, 0, slotWindowToDesktopUp() ); - DEF( I18N_NOOP("Window One Desktop Down"), 0, 0, slotWindowToDesktopDown() ); + 0, slotWindowOnAllDesktops() ); + DEF( I18N_NOOP("Window to Desktop 1"), WIN+ALT+Qt::Key_F1, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 2"), WIN+ALT+Qt::Key_F2, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 3"), WIN+ALT+Qt::Key_F3, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 4"), WIN+ALT+Qt::Key_F4, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 5"), WIN+ALT+Qt::Key_F5, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 6"), WIN+ALT+Qt::Key_F6, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 7"), WIN+ALT+Qt::Key_F7, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 8"), WIN+ALT+Qt::Key_F8, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 9"), WIN+ALT+Qt::Key_F9, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 10"), WIN+ALT+Qt::Key_F10, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 11"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 12"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 13"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 14"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 15"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 16"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 17"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 18"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 19"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Desktop 20"), 0, slotWindowToDesktop(int) ); + DEF( I18N_NOOP("Window to Next Desktop"), 0, slotWindowToNextDesktop() ); + DEF( I18N_NOOP("Window to Previous Desktop"), 0, slotWindowToPreviousDesktop() ); + DEF( I18N_NOOP("Window One Desktop to the Right"), 0, slotWindowToDesktopRight() ); + DEF( I18N_NOOP("Window One Desktop to the Left"), 0, slotWindowToDesktopLeft() ); + DEF( I18N_NOOP("Window One Desktop Up"), 0, slotWindowToDesktopUp() ); + DEF( I18N_NOOP("Window One Desktop Down"), 0, slotWindowToDesktopDown() ); keys->insert( "Group:Desktop Switching", i18n("Desktop Switching") ); DEF( I18N_NOOP("Switch to Desktop 1"), CTRL+Qt::Key_F1, WIN+Qt::Key_F1, slotSwitchToDesktop(int) ); @@ -119,33 +121,33 @@ DEF( I18N_NOOP("Switch to Desktop 8"), CTRL+Qt::Key_F8, WIN+Qt::Key_F8, slotSwitchToDesktop(int) ); DEF( I18N_NOOP("Switch to Desktop 9"), CTRL+Qt::Key_F9, WIN+Qt::Key_F9, slotSwitchToDesktop(int) ); DEF( I18N_NOOP("Switch to Desktop 10"), CTRL+Qt::Key_F10, WIN+Qt::Key_F10, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 11"), CTRL+Qt::Key_F11, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 12"), CTRL+Qt::Key_F12, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 13"), CTRL+SHIFT+Qt::Key_F1, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 14"), CTRL+SHIFT+Qt::Key_F2, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 15"), CTRL+SHIFT+Qt::Key_F3, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 16"), CTRL+SHIFT+Qt::Key_F4, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 17"), CTRL+SHIFT+Qt::Key_F5, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 18"), CTRL+SHIFT+Qt::Key_F6, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 19"), CTRL+SHIFT+Qt::Key_F7, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Desktop 20"), CTRL+SHIFT+Qt::Key_F8, 0, slotSwitchToDesktop(int) ); - DEF( I18N_NOOP("Switch to Next Desktop"), 0, 0, slotSwitchDesktopNext() ); - DEF( I18N_NOOP("Switch to Previous Desktop"), 0, 0, slotSwitchDesktopPrevious() ); - DEF( I18N_NOOP("Switch One Desktop to the Right"), 0, 0, slotSwitchDesktopRight() ); - DEF( I18N_NOOP("Switch One Desktop to the Left"), 0, 0, slotSwitchDesktopLeft() ); - DEF( I18N_NOOP("Switch One Desktop Up"), 0, 0, slotSwitchDesktopUp() ); - DEF( I18N_NOOP("Switch One Desktop Down"), 0, 0, slotSwitchDesktopDown() ); + DEF( I18N_NOOP("Switch to Desktop 11"), CTRL+Qt::Key_F11, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 12"), CTRL+Qt::Key_F12, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 13"), CTRL+SHIFT+Qt::Key_F1, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 14"), CTRL+SHIFT+Qt::Key_F2, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 15"), CTRL+SHIFT+Qt::Key_F3, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 16"), CTRL+SHIFT+Qt::Key_F4, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 17"), CTRL+SHIFT+Qt::Key_F5, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 18"), CTRL+SHIFT+Qt::Key_F6, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 19"), CTRL+SHIFT+Qt::Key_F7, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Desktop 20"), CTRL+SHIFT+Qt::Key_F8, slotSwitchToDesktop(int) ); + DEF( I18N_NOOP("Switch to Next Desktop"), 0, slotSwitchDesktopNext() ); + DEF( I18N_NOOP("Switch to Previous Desktop"), 0, slotSwitchDesktopPrevious() ); + DEF( I18N_NOOP("Switch One Desktop to the Right"), 0, slotSwitchDesktopRight() ); + DEF( I18N_NOOP("Switch One Desktop to the Left"), 0, slotSwitchDesktopLeft() ); + DEF( I18N_NOOP("Switch One Desktop Up"), 0, slotSwitchDesktopUp() ); + DEF( I18N_NOOP("Switch One Desktop Down"), 0, slotSwitchDesktopDown() ); keys->insert( "Group:Miscellaneous", i18n("Miscellaneous") ); - DEF( I18N_NOOP("Mouse Emulation"), ALT+Qt::Key_F12, 0, slotMouseEmulation() ); + DEF( I18N_NOOP("Mouse Emulation"), ALT+Qt::Key_F12, slotMouseEmulation() ); DEF( I18N_NOOP("Kill Window"), ALT+CTRL+Qt::Key_Escape, WIN+CTRL+Qt::Key_Delete, slotKillWindow() ); - DEF( I18N_NOOP("Window Screenshot"), ALT+Qt::Key_Print, ALT+Qt::Key_Print, slotGrabWindow() ); + DEF( I18N_NOOP("Window Screenshot"), ALT+Qt::Key_Print, slotGrabWindow() ); DEF( I18N_NOOP("Desktop Screenshot"), CTRL+Qt::Key_Print, WIN+Qt::Key_Print, slotGrabDesktop() ); #ifdef IN_KWIN { KGlobalAccel* keys = disable_shortcuts_keys; #endif - DEF( I18N_NOOP("Block Global Shortcuts"), 0, 0, slotDisableGlobalShortcuts()); + DEF( I18N_NOOP("Block Global Shortcuts"), 0, slotDisableGlobalShortcuts()); #ifdef IN_KWIN } #endif