Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-09-12 21:41:02

colin_e
Member
Registered: 2016-08-26
Posts: 2

Problem defining global hotkey with 3-key trigger

Hi, very new to XFCE so bear with me...

I have installed Keepass2 on my linux machine which is running Debian Squeeze 8.5 and XFCE4.

On my Windows machines I use "<cntl> + <alt> + P" as the auto-type trigger for Keepass. On Windoze the KP shortcut is defined in the application but I understand in XFCE it must be configured as a global shortcut, however i'm having difficulty setting this up.

Using the Settings->Keyboard->Application Shortcuts tool, I can enter the command line (keepass2 --auto-type) and hit enter, but then when I try to type the trigger sequence the popup window closes as soon as it's read any two of the 3 keys I want to press.

So far i've managed to get triggers entered that show in the shortcut list as "<Alt>Control_L" or "<Primary>Alt_L" (i.e. pressing alt then control, or vice-versa) but I never get as far as pressing all 3 keys for control-alt-P before the dialog closes!?

Once an item is defined, the command line can be edited but not the trigger, so this tool seems incapable of creating 3-key shortcuts.

I can see the resulting settings in the main settings editor (Settings->Settings Editor->xfce4-keyboard-shortcuts) but although the names of these entries look as if they define the keyboard shortcut (e.g. the first one above is named "/commands/custom/<Alt>Control_L") I have found editing property name doesn;t seem to actually change the trigger.


This is proving to be remarkably tricky in the GUI tools. Is XFCE capable of handling 3-key shortcut triggers, and if so do I have to resort to hand-editing config files to set them up?

Offline

#2 2016-09-12 23:01:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Problem defining global hotkey with 3-key trigger

Xfce is capable of handling 3-key shortcuts. Is it possible that you have the Alt+Ctrl combination mapped to something else that is causing the effect (in either the keyboard shortcuts or window manager shortcuts GUI dialogs? You can post back your ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml file if you want a second set of eyes have a look at it.

If you want to edit the xml file yourself, you should really do it while not logged into Xfce. Xfce uses xfconf to manage those files and the manual changes you make may be overwritten by xfconf. The good news is that you can use xfconf-query to manipulate those files from the command line if you don't or can't use the GUI. For example, to create your shortcut, you could use the following command:

xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary><Alt>p" -n -t string -s "keypass2 --auto-type"

But I think we need to figure out why the dialog is closing when you press Alt+Ctrl. Even if you add the shortcut, you may not be able to get to it if another shortcut is interfering.

BTW, welcome to the forum.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-09-12 23:28:39

colin_e
Member
Registered: 2016-08-26
Posts: 2

Re: Problem defining global hotkey with 3-key trigger

Thanks ToZ, that certainly sounds like a rational reason for the issue.

I can't see an option for adding attachments  so it looks like i'll have to post the contents of the xfce4-keyboard-shortcuts.xml file inline.

--------------------------------------------- ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ----------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-keyboard-shortcuts" version="1.0">
  <property name="commands" type="empty">
    <property name="default" type="empty">
      <property name="&lt;Alt&gt;F1" type="empty"/>
      <property name="&lt;Alt&gt;F2" type="empty">
        <property name="startup-notify" type="empty"/>
      </property>
      <property name="&lt;Alt&gt;F3" type="empty">
        <property name="startup-notify" type="empty"/>
      </property>
      <property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="empty"/>
      <property name="XF86Display" type="empty"/>
      <property name="&lt;Super&gt;p" type="empty"/>
      <property name="&lt;Primary&gt;Escape" type="empty"/>
      <property name="XF86WWW" type="empty"/>
      <property name="XF86Mail" type="empty"/>
    </property>
    <property name="custom" type="empty">
      <property name="&lt;Alt&gt;F1" type="string" value="xfce4-popup-applicationsmenu"/>
      <property name="&lt;Alt&gt;F3" type="string" value="xfce4-appfinder"/>
      <property name="&lt;Alt&gt;F2" type="string" value="xfce4-appfinder --collapsed"/>
      <property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xflock4"/>
      <property name="XF86Mail" type="string" value="exo-open --launch MailReader"/>
      <property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
      <property name="XF86WWW" type="string" value="exo-open --launch WebBrowser"/>
      <property name="&lt;Super&gt;p" type="string" value="xfce4-display-settings --minimal"/>
      <property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/>
      <property name="override" type="bool" value="true"/>
      <property name="&lt;Alt&gt;Control_L" type="string" value="keepass2 --auto-type"/>
      <property name="&lt;Primary&gt;Alt_L" type="string" value="keepass2 --auto-type"/>
    </property>
  </property>
  <property name="xfwm4" type="empty">
    <property name="default" type="empty">
      <property name="&lt;Alt&gt;Insert" type="empty"/>
      <property name="Escape" type="empty"/>
      <property name="Left" type="empty"/>
      <property name="Right" type="empty"/>
      <property name="Up" type="empty"/>
      <property name="Down" type="empty"/>
      <property name="&lt;Alt&gt;Tab" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Shift&gt;Tab" type="empty"/>
      <property name="&lt;Alt&gt;Delete" type="empty"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Down" type="empty"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Left" type="empty"/>
      <property name="&lt;Shift&gt;&lt;Alt&gt;Page_Down" type="empty"/>
      <property name="&lt;Alt&gt;F4" type="empty"/>
      <property name="&lt;Alt&gt;F6" type="empty"/>
      <property name="&lt;Alt&gt;F7" type="empty"/>
      <property name="&lt;Alt&gt;F8" type="empty"/>
      <property name="&lt;Alt&gt;F9" type="empty"/>
      <property name="&lt;Alt&gt;F10" type="empty"/>
      <property name="&lt;Alt&gt;F11" type="empty"/>
      <property name="&lt;Alt&gt;F12" type="empty"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Left" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;End" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;Home" type="empty"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Right" type="empty"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Up" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_1" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_2" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_3" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_4" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_5" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_6" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_7" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_8" type="empty"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_9" type="empty"/>
      <property name="&lt;Alt&gt;space" type="empty"/>
      <property name="&lt;Shift&gt;&lt;Alt&gt;Page_Up" type="empty"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Right" type="empty"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;d" type="empty"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Up" type="empty"/>
      <property name="&lt;Super&gt;Tab" type="empty"/>
      <property name="&lt;Control&gt;F1" type="empty"/>
      <property name="&lt;Control&gt;F2" type="empty"/>
      <property name="&lt;Control&gt;F3" type="empty"/>
      <property name="&lt;Control&gt;F4" type="empty"/>
      <property name="&lt;Control&gt;F5" type="empty"/>
      <property name="&lt;Control&gt;F6" type="empty"/>
      <property name="&lt;Control&gt;F7" type="empty"/>
      <property name="&lt;Control&gt;F8" type="empty"/>
      <property name="&lt;Control&gt;F9" type="empty"/>
      <property name="&lt;Control&gt;F10" type="empty"/>
      <property name="&lt;Control&gt;F11" type="empty"/>
      <property name="&lt;Control&gt;F12" type="empty"/>
    </property>
    <property name="custom" type="empty">
      <property name="&lt;Control&gt;F3" type="string" value="workspace_3_key"/>
      <property name="&lt;Control&gt;F4" type="string" value="workspace_4_key"/>
      <property name="&lt;Control&gt;F5" type="string" value="workspace_5_key"/>
      <property name="&lt;Control&gt;F6" type="string" value="workspace_6_key"/>
      <property name="&lt;Control&gt;F7" type="string" value="workspace_7_key"/>
      <property name="&lt;Control&gt;F8" type="string" value="workspace_8_key"/>
      <property name="&lt;Control&gt;F9" type="string" value="workspace_9_key"/>
      <property name="&lt;Alt&gt;Tab" type="string" value="cycle_windows_key"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Right" type="string" value="right_workspace_key"/>
      <property name="Left" type="string" value="left_key"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;d" type="string" value="show_desktop_key"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Left" type="string" value="move_window_left_key"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Right" type="string" value="move_window_right_key"/>
      <property name="Up" type="string" value="up_key"/>
      <property name="&lt;Alt&gt;F4" type="string" value="close_window_key"/>
      <property name="&lt;Alt&gt;F6" type="string" value="stick_window_key"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Down" type="string" value="down_workspace_key"/>
      <property name="&lt;Alt&gt;F7" type="string" value="move_window_key"/>
      <property name="&lt;Alt&gt;F9" type="string" value="hide_window_key"/>
      <property name="&lt;Alt&gt;F11" type="string" value="fullscreen_key"/>
      <property name="&lt;Alt&gt;F8" type="string" value="resize_window_key"/>
      <property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>
      <property name="Escape" type="string" value="cancel_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_1" type="string" value="move_window_workspace_1_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_2" type="string" value="move_window_workspace_2_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_3" type="string" value="move_window_workspace_3_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_4" type="string" value="move_window_workspace_4_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_5" type="string" value="move_window_workspace_5_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_6" type="string" value="move_window_workspace_6_key"/>
      <property name="Down" type="string" value="down_key"/>
      <property name="&lt;Control&gt;&lt;Shift&gt;&lt;Alt&gt;Up" type="string" value="move_window_up_key"/>
      <property name="&lt;Shift&gt;&lt;Alt&gt;Page_Down" type="string" value="lower_window_key"/>
      <property name="&lt;Alt&gt;F12" type="string" value="above_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_8" type="string" value="move_window_workspace_8_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_9" type="string" value="move_window_workspace_9_key"/>
      <property name="Right" type="string" value="right_key"/>
      <property name="&lt;Alt&gt;F10" type="string" value="maximize_window_key"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Up" type="string" value="up_workspace_key"/>
      <property name="&lt;Control&gt;F10" type="string" value="workspace_10_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;KP_7" type="string" value="move_window_workspace_7_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;End" type="string" value="move_window_next_workspace_key"/>
      <property name="&lt;Alt&gt;Delete" type="string" value="del_workspace_key"/>
      <property name="&lt;Control&gt;&lt;Alt&gt;Left" type="string" value="left_workspace_key"/>
      <property name="&lt;Control&gt;F12" type="string" value="workspace_12_key"/>
      <property name="&lt;Alt&gt;space" type="string" value="popup_menu_key"/>
      <property name="&lt;Alt&gt;&lt;Shift&gt;Tab" type="string" value="cycle_reverse_windows_key"/>
      <property name="&lt;Shift&gt;&lt;Alt&gt;Page_Up" type="string" value="raise_window_key"/>
      <property name="&lt;Alt&gt;Insert" type="string" value="add_workspace_key"/>
      <property name="&lt;Alt&gt;&lt;Control&gt;Home" type="string" value="move_window_prev_workspace_key"/>
      <property name="&lt;Control&gt;F2" type="string" value="workspace_2_key"/>
      <property name="&lt;Control&gt;F1" type="string" value="workspace_1_key"/>
      <property name="&lt;Control&gt;F11" type="string" value="workspace_11_key"/>
      <property name="override" type="bool" value="true"/>
    </property>
  </property>
  <property name="providers" type="array">
    <value type="string" value="xfwm4"/>
    <value type="string" value="commands"/>
  </property>
</channel>

Somewhere in here might be a <control><alt> combo, but I assume it can occurr in either order, and the key names aren't entirely familiar (what makes the laft control key "Primary" for example?).

ToZ: added code tags

Last edited by ToZ (2016-09-13 00:00:44)

Offline

#4 2016-09-13 00:03:47

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Problem defining global hotkey with 3-key trigger

I added code tags to your post to make it more readable.

I notice that you have two entries for keepass defined already (one for alt+ctrl and one for primary+left alt):

      <property name="&lt;Alt&gt;Control_L" type="string" value="keepass2 --auto-type"/>
      <property name="&lt;Primary&gt;Alt_L" type="string" value="keepass2 --auto-type"/>

Can you go back to the keyboard shortcuts dialog, locate the two entries and "remove" them? Then, try to re-create the shortcut again.

If it still doesn't work, delete any that may have been created and use the xfconf-query command that I posted above to create the shortcut.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB