1

I'd like to use several custom keybindings to handle windows more effectively. So I copied the rc.xml from /etc/xdg/openbox/ to ~/.config/openbox/ and edited the relevant (<keyboard>) section of the copy. In order to see how it works, I added the following simplest fragment:

<keybind key="W-Up">
    <action name="Maximize"/>
</keybind>

What do I do next? I have tried «openbox --reconfigure», «openbox --configure ~/.config/openbox/rc.xml», «openbox --replace», even combinations of these parameters to no avail (rebooting did not help either).

P. S. I use Lubuntu 20.04 x64.

S. N.
  • 175
  • 1
  • 3
  • 11
  • 1
    Lubuntu 20.04 uses LXQt. At login time, do you use the Lubuntu session or the Openbox session? In the Lubuntu or LXQt sessions, the `W` key aka the `Super` key aka the `Meta` key cannot be used the way you intend. See https://askubuntu.com/questions/1182097/lubuntu-19-10-20-04-how-to-tile-windows-the-window-tiling-section-is-missing for why. In short, `C+W+Up` will work but `W+Up` won't. – DK Bose May 24 '20 at 10:26
  • @guiverc I see, thank you! – S. N. May 24 '20 at 12:02
  • @DKBose I have read the post you are referring to (btw, thank for the analysis and detailed answer). I copied the code for the actions triggred by `C-W-Up`, modified `~/.config/openbox/rc.xml` and run `openbox --reconfigure`. Hitting `Ctrl-Win-Up` (I took into account your comment about the order of keys pressing) still has no any visible effect. – S. N. May 24 '20 at 12:04
  • Hi, I'm sorry but did you rename your file to `lxqt-rc.xml` from just `rc.xml`? That step is important. – DK Bose May 24 '20 at 12:05
  • @DKBose Also, I modified '~/.config/openbox/lxqt-rc.xml' with the same piece of code and performed «reconfiguration». Still no luck. – S. N. May 24 '20 at 12:07
  • Essentially, I copied both these files from `/etc/xdg/openbox/` and modified each of them. – S. N. May 24 '20 at 12:08
  • When you run `openbox --reconfigure` is there any response in the terminal? – DK Bose May 24 '20 at 12:10
  • Nope. No any output. – S. N. May 24 '20 at 12:11
  • Then I suggest you post your `~/.config/openbox/lxqt-rc.xml` as a pastebin link for us to look at. – DK Bose May 24 '20 at 12:13
  • @DKBose Sorry for the delay. [Here](https://pastebin.com/YZ3mYz2X) we are. The only change I did to this file was insertion of lines №№ 189-197. – S. N. May 24 '20 at 13:32
  • Okay, please give me some time to look at it. – DK Bose May 24 '20 at 13:33
  • What you uploaded has just `W-Up`, `W-Down`, etc instead of `C-W-Up`, `C-W-Down`, etc. – DK Bose May 24 '20 at 13:47
  • @DKBose I am not quite sure I understand what you mean. Take a look at the line № 189. It is ` `.` – S. N. May 24 '20 at 13:52
  • 1
    But see lines 329-331! Also, put your code after the `ChainQuit` stanza, not before it. – DK Bose May 24 '20 at 14:04
  • 2
    @DKBose Yes, that works! I moved the block to the very end of the section, just before `` and that was it. Were it an answer, in stead of comment, I would be glad to accept it. As it is now, I can only say that I appreciate your helping. I'll update my original question in stead. – S. N. May 24 '20 at 14:15
  • You're welcome! – DK Bose May 24 '20 at 14:19

2 Answers2

2

The solution was found. The credit for it goes entirely to @DK Bose. Here are three items that sum up our lengthy exchange of comments:

  1. the file to edit is ~/.config/openbox/lxqt-rc.xml (if it does not exist, it should be copied from /etc/xdg/openbox)
  2. hotkeys like Win-Left, Win-Up and so on do not work in LXQt (see the Lubuntu manual); one should stick with alternatives, for example, Ctrl-Win-Left and the likes or some thing else;
  3. the xml blocks for specific bindings should not be the first lines after the opening <keyboard> tag (it is failproof to put them at the end of the keyboard binding section, i. e. right before </keyboard>).
S. N.
  • 175
  • 1
  • 3
  • 11
0

hotkeys like Win-Left, Win-Up and so on do not work in LXQt (see the Lubuntu manual);

That's not true. W-Left and W-Up work, if in the LXQt-Settings in the Shortcut Keys "Show/hide main menu" is deactivated, or "Show/hide main menu" is set to something else than W, like for example W+Y.