Page MenuHomeLubuntu Development

fix keyboard shortcuts
Open, HighPublic

Description

We had this before and it got lost. I think I managed to consolidate all the comments and everything…

We made the Super key the default shortcut for opening the menu. This is a no brainer. Unfortunately, I discovered this makes the Openbox Super key combos not work. LXQt does not consider Openbox the canonical window manager of the desktop environment, so they won't do anything to fix this. So I'd like to propose a multi-tiered solution:

  • As much as possible, we move shortcuts defined by Openbox to being defined by lxqt-globalkeys. This won't work for the window manager specific stuff.
  • Redefine the remaining Super key combos in Openbox to not use the Super key. This will unfortunately violate the way things have been done in the past, but at least we'll have functionality.
  • If reasonable, apply the above as much as possible to 18.10, too. It's been brought up a few times.

The logic here is that there are options that lxqt-globalkeys provides that Openbox simply cannot accomplish. Plus, it theoretically can be used as the place to look for most shortcuts. Application specific shortcuts (such as window manager ones) would be in those applications. Not to mention the fact that it's easy to graphically edit shortcuts in lxqt-globalkeys but it is simply not possible in Openbox. Openbox requires manually editing an XML file, knowing all of its particular quirks (such as the name of the actions and the ways to depict certain keys) and manually forcing Openbox to reconfigure. That's a lot to ask if what we're trying to produce is something usable and intuitive. I'd like to use it less and less because of that. And then there's the fact that should someone (myself included) choose to use a different window manager, non-window manager shortcuts are not removed.

We could delete these

     <keybind key="W-F1">
	    <action name="GoToDesktop"><to>1</to></action>
	  </keybind>
	  <keybind key="W-F2">
	    <action name="GoToDesktop"><to>2</to></action>
	  </keybind>
	  <keybind key="W-F3">
	    <action name="GoToDesktop"><to>3</to></action>
	  </keybind>
	  <keybind key="W-F4">
	    <action name="GoToDesktop"><to>4</to></action>
	  </keybind>

These are currently defined as Ctrl + F-key using client command /panel/desktopswitch/desktop_#.

     <keybind key="W-d">
	    <action name="ToggleShowDesktop"/>
	  </keybind>

This is currently defined as Ctrl + Alt + D using panel/showdesktop/show_hide.

	  <!--  Lubuntu specific : Keybindings -->
	
	  <!-- Keybindings for running applications on Home + E -->
	  <keybind key="W-e">
	    <action name="Execute">
	      <startupnotify>
	        <enabled>true</enabled>
	        <name>File manager</name>
	      </startupnotify>
	      <command>pcmanfm-qt</command>
	    </action>
	  </keybind>

This is currently set to Ctrl + Alt + E.

	  <!-- Keybindings for running Run menu from Lxpanel on Home + R-->
	  <keybind key="W-r">
	    <action name="Execute">
	      <command>lxqt-runner</command>
	    </action>
	  </keybind>

This is currently set to Alt + F2 with /runner/show_hide_dialog.

	  <!-- Keybindings for window switching with the arrow keys -->
	  <keybind key="W-S-Right">
	    <action name="DirectionalCycleWindows">
	      <direction>right</direction>
	    </action>
	  </keybind>
	  <keybind key="W-S-Left">
	    <action name="DirectionalCycleWindows">
	      <direction>left</direction>
	    </action>
	  </keybind>
	  <keybind key="W-S-Up">
	    <action name="DirectionalCycleWindows">
	      <direction>up</direction>
	    </action>
	  </keybind>
	  <keybind key="W-S-Down">
	    <action name="DirectionalCycleWindows">
	      <direction>down</direction>
	    </action>
	  </keybind>

You can activate different "tasks" with Meta + # with /panel/taskbar/task_# although that's not really the same.

On the other hand, + Alt + is likely sufficient.

These are unique and deserve discussion

	    <!--
	        Lubuntu specific.
	        Keybindings for window tiling
	    -->
	    <!--
	        # HalfLeftScreen
	    -->
	  <keybind key="W-Left">
	    <action name="UnmaximizeFull"/>
	    <action name="MoveResizeTo">
	      <x>0</x>
	      <y>0</y>
	      <height>100%</height>
	      <width>50%</width>
	    </action>
	  </keybind>
	    <!--
	        # HalfRightScreen
	    -->
	  <keybind key="W-Right">
	    <action name="UnmaximizeFull"/>
	    <action name="MoveResizeTo">
	      <x>-0</x>
	      <y>0</y>
	      <height>100%</height>
	      <width>50%</width>
	    </action>
	  </keybind>
	    <!--
	        # HalfUpperScreen
	    -->
	  <keybind key="W-Up">
	    <action name="UnmaximizeFull"/>
	    <action name="MoveResizeTo">
	      <x>0</x>
	      <y>0</y>
	      <width>100%</width>
	      <height>50%</height>
	    </action>
	  </keybind>
	    <!--
	        # HalfLowerScreen
	    -->
	  <keybind key="W-Down">
	    <action name="UnmaximizeFull"/>
	    <action name="MoveResizeTo">
	      <x>0</x>
	      <y>-0</y>
	      <width>100%</width>
	      <height>50%</height>
	    </action>
	  </keybind>

Apparently window tiling is contentious. I assert that if you want that, you should get a tiling window manager! Even KWin doesn't really handle tiling. There's a script out there to make it work but reading some discussion on it, it's not foolproof. The Lubuntu "solution" wasn't really ideal, either (and was not an Openbox one, but one we developed) and is probably best described a window arrangement hack that vaguely resembled tiling. We should support the things we know we can support and that work well. That's not one of them.

If push comes to shove, I think the best solution would be to use Alt + arrow keys for tiling. Or maybe Control + Alt + + arrow keys. I don't consider it a "top level" shortcut. It would be nicer to use Alt + arrow keys for something most everyone is going to use.

BTW here's what we have in lxqt-globalkeys:

Comment=Switch to desktop 7
Comment=Switch to desktop 10
Comment=Switch to desktop 11

The above are all unset.

Comment=Show/hide runner dialog

This one does not show in globalkeys.conf (bug) but it's set to Alt+F2.

Openbox sets this to Super+R but ideally we remove that as discussed above since it doesn't actually work (unless you use the right Super key with it or unset the left Super key for the menu). The Super that was used for the menu was the left one. The right Super functions normally as far as Openbox. Not every keyboard has a right Super, however.

However, It should be further noted that the Super that was used for the menu was the left one. The right Super functions normally as far as Openbox. Not every keyboard has a right Super however. I think we will still want to make sure the bindings match in the end. However, It seems that in combinations, lxqt-globalkeys makes no distinction between right and left Super keys and instead refers to them all as Meta.

However, tt seems that in combinations, lxqt-globalkeys makes no distinction between right and left Super keys and instead refers to them all as Meta.

[Control+Alt+D]
Comment=Show desktop
[Super_L]
Comment=Show/hide main menu

There's desktopy stuff.

[XF86AudioLowerVolume]
Comment=Decrease sound volume
[XF86AudioMute]
Comment=Mute/unmute sound volume
[XF86AudioRaiseVolume]
Comment=Increase sound volume

There's audio stuff.

[XF86MonBrightnessDown]
Comment=\x2600 \x2193
[XF86MonBrightnessUp]
Comment=\x2600 \x2191
[Shift+Control+F6]
Comment=\x2600 \x2193
[Shift+Control+F7]
Comment=\x2600 \x2191

There's two options for raising/lowering the brightness (expressed as ☀ ↑ and ☀ ↓).

[Control+Alt+E]
Comment=Pcmanfm
[Control+Alt+I]
Comment=Web browser
[Control+Alt+L]
Comment=lockscreen
[Print]
Comment=screen shot

There's programs run by hotkeys.

[Control+F1]
Comment=Switch to desktop 1
[Control+F12]
Comment=Switch to desktop 12
[Control+F2]
Comment=Switch to desktop 2
[Control+F3]
Comment=Switch to desktop 3
[Control+F4]
Comment=Switch to desktop 4
[Control+F5]
Comment=Switch to desktop 5
[Control+F6]
Comment=Switch to desktop 6
[Control+F8]
Comment=Switch to desktop 8
[Control+F9]
Comment=Switch to desktop 9
[Meta+0]
Comment=Activate task 10
[Meta+1]
Comment=Activate task 1
[Meta+2]
Comment=Activate task 2
[Meta+3]
Comment=Activate task 3
[Meta+4]
Comment=Activate task 4
[Meta+5]
Comment=Activate task 5
[Meta+6]
Comment=Activate task 6
[Meta+7]
Comment=Activate task 7
[Meta+8]
Comment=Activate task 8
[Meta+9]
Comment=Activate task 9

Here's ones not involving the Super key we need to deal with:

Add to lxqt-globalkeys

	  <!-- Keybindings for desktop switching -->
	  <keybind key="C-A-Left">
	    <action name="GoToDesktop"><to>left</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="C-A-Right">
	    <action name="GoToDesktop"><to>right</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="C-A-Up">
	    <action name="GoToDesktop"><to>up</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="C-A-Down">
	    <action name="GoToDesktop"><to>down</to><wrap>no</wrap></action>
	  </keybind>

	  <keybind key="A-space">
	    <action name="ShowMenu"><menu>client-menu</menu></action>
	  </keybind>

	  <!-- Launch task manager on Ctrl + Alt + Del-->
	  <keybind key="C-A-Delete">
	    <action name="Execute">
	      <command>qps</command>
	    </action>
	  </keybind>
	
	  <!-- Launch a terminal on Ctrl + Alt + T-->
	  <keybind key="C-A-T">
	    <action name="Execute">
	      <command>qterminal</command>
	    </action>
	  </keybind>
	
	  <!-- Keybinding for terminal button-->
	  <keybind key="XF86WWW">
	    <action name="Execute">
	      <command>qterminal</command>
	    </action>
	  </keybind>
	  <keybind key="XF86Terminal">
	    <action name="Execute">
	      <command>qterminal</command>
	    </action>
	  </keybind>

	  <!-- Keybinding for computer button-->
	  <keybind key="XF86MyComputer">
	    <action name="Execute">
	      <command>pcmanfm-qt</command>
	    </action>
	  </keybind>

Keep these as is

	  <!-- Keybindings for Multimedia Keys and LCD Backlight (alternative when not using gnome-power-manager or xfce4-volumed) -->
	  <keybind key="C-F10">
	    <action name="Execute">
	      <command>xbacklight -dec 10</command>
	    </action>
	  </keybind>
	  <keybind key="C-F11">
	    <action name="Execute">
	      <command>xbacklight -inc 10</command>
	    </action>
	  </keybind>

xbacklight isn't even installed we'd want to swap those out for the appropriate lxqt-config-brightness command. Also maybe we should set these to switch to the 10th and 11th desktops and come up with new solutions for the actual keystroke, like media keys.

	  <keybind key="C-F7">
	    <action name="Execute">
	      <command>xset dpms force off</command>
	    </action>
	  </keybind>

This is a monitor shutdown. There may be a better way to do this.

Miscellaneous

	  <keybind key="S-A-Left">
	    <action name="SendToDesktop"><to>left</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="S-A-Right">
	    <action name="SendToDesktop"><to>right</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="S-A-Up">
	    <action name="SendToDesktop"><to>up</to><wrap>no</wrap></action>
	  </keybind>
	  <keybind key="S-A-Down">
	    <action name="SendToDesktop"><to>down</to><wrap>no</wrap></action>
	  </keybind>

I wonder if we can get upstream to support these.

Commented out - let's delete

	  <!-- Keybindings for running Menu from Lxpanel -->
	<!--
	  <keybind key="A-F1">
	    <action name="Execute">
	      <command>lxpanelctl menu</command>
	    </action>
	  </keybind>
	  <keybind key="C-Escape">
	    <action name="Execute">
	      <command>lxpanelctl menu</command>
	    </action>
	  </keybind>
	-->

These we could just add as alternatives to Alt + Space and Super. I kind of feel like maybe that's ALOT, but who knows.

	  <!-- Lock the screen on Ctrl + Alt + l-->
	  <!--
	  <keybind key="C-A-l">
	    <action name="Execute">
	      <command>lxsession-default lock</command>
	    </action>
	  </keybind>
	-->

We already have this set in lxqt-globalkeys.

	  <!-- Keybinding for calculator button-->
	  <!--
	  <keybind key="XF86Calculator">
	    <action name="Execute">
	      <command>lxsession-default calculator</command>
	    </action>
	  </keybind>
	-->
	
	  <!--
	      Take a screenshot of the current window with scrot when Alt+Print are pressed
	  -->
	  <!--
	  <keybind key="Print">
	    <action name="Execute">
	      <command>lxsession-default screenshot</command>
	    </action>
	  </keybind>
	  <keybind key="A-Print">
	    <action name="Execute">
	      <command>lxsession-default screenshot window</command>
	    </action>
	  </keybind>
	  -->
	
	  <!-- Launch logout when push on the shutdown button -->
	  <!--
	  <keybind key="XF86PowerOff">
	    <action name="Execute">
	      <command>lxsession-default quit</command>
	    </action>
	  </keybind>
	-->

Not sure why we even have these if they're commented out. Maybe we should add them? They are LXDE commands, so whatever they are, they're old.

While we're at all this, too, we should probably deal with missing keys, especially those media keys. We have at least one bug report about the missing Eject key.

Related Objects

StatusAssignedTask
Opentsimonq2
OpenNone

Event Timeline

wxl created this task.Apr 14 2019, 12:16 AM
wxl triaged this task as High priority.
wxl updated the task description. (Show Details)Apr 14 2019, 12:24 AM
wxl updated the task description. (Show Details)Apr 14 2019, 1:35 AM