[Interest] Standard QKeySequence for "Fullscreen" (was: Contributor agreement rundown)

BRM bm_witness at yahoo.com
Fri Apr 20 15:58:15 CEST 2012


----- Original Message -----

> as a follow-up from "Contributor agreement rundown":
> 
> According to
> 
>   http://doc-snapshot.qt-project.org/5.0/qkeysequence.html#standard-shortcuts
> 
> a standard key sequence for "Fullscreen" is still missing.
> 
>   Apple says "Control+Command+F":
>   
> http://developer.apple.com/library/mac/#documentation/userexperience/conceptual/applehiguidelines/KeyboardShortcuts/KeyboardShortcuts.html#//apple_ref/doc/uid/TP40002725-SW2
> 
>   Microsoft says "F11 or Alt+Enter":
>   http://msdn.microsoft.com/en-us/library/windows/desktop/bb545461.aspx
> 
>   KDE says "F11 or Ctrl+Shift+F":
>   http://techbase.kde.org/Projects/Usability/HIG/Keyboard_Shortcuts
> 
>   Gnome says "Ctrl+F11":
>   
> http://developer.gnome.org/hig-book/3.0/input-keyboard.html.en#standard-shortcuts
> 
> 
> I don't know whether this is already taken care of, but - where
> applicable - the standard keys should also consider user settings
> which might have changed these standard keys, for example to be
> evaluated upon application initialisation. The "premium solution"
> would get notified of user setting changes and change the shortcuts at
> runtime :)
> 
> 
> Unfortunatelly I don't have the time resources (and currently my
> harddisk is overloaded with photos and videos, too - sorry ;)) to
> implement and contribute such an extension for Qt 5 (and maybe
> downbranch it to 4.8.x, too). Having a "static" shortcut (ignoring the
> user settings) for "Fullscreen" - as proposed by the guides above -
> would already be a start and such a solution would certainly get my
> vote :)

While I unfornately don't have time to implement this either, perhaps what is being sought after is something more along the lines of:

1. Create a shortcut based on application specification (e.g. CTRL+F11)
2. Register the shortcut into a layer that maps it to an Application+System override

That is, the first establishes the shortcut much like we do now.
The second lets the programmer map the shortcut from what they setup to (i) system settings, and (ii) application settings on platforms that support it.
Would it make sense to have such an interface as part of QPA?

This could probably be managed by setting up the QAction (or other items that create utilize the shortcuts), and then having another function that enables mapping it.
E.g.:

QAction* action_full_screen = new QAction( tr("Full Screen"));
action_full_screen->setShortcut(Qt::Key_Control | Qt::Key_F11);

// update action_full_screen's shortcut to match system and application settings on supported platforms
systemShortcuts.map(QPlatformShortcutIntegration::FULL_SCREEN, action_full_screen);

Or perhaps:

QAction* action_full_screen = systemShortcuts.createAction(QPlatformShortcutIntegration::FULL_SCREEN, tr("Full Screen"), (Qt::Key_Control | Qt::Key_F11));

Or something like that...

This would enable it to be extensible for other things as well - Font Increase/Decrease, sub-window management, etc.

$0.02

Ben



More information about the Interest mailing list