Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 23 of 23
Thanks, I didn't know that XbindKeys could handle multiple key sequences. I will check it out. I wonder if it can detect which window is active and act accordingly....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Just Joined!
    Join Date
    Aug 2007
    Location
    Hastings, New Zealand
    Posts
    12

    Thanks, I didn't know that XbindKeys could handle multiple key sequences. I will check it out. I wonder if it can detect which window is active and act accordingly.

  2. #22
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261
    I think xnee is more able to do that.
    It seems to react like autohotkey.
    Well, from a 10/20 minute glance at how all of it worked, that's what I evaluated.

    I suspect you will build a script using another window manager executable.
    1. The script calls for the executable to notice which window is open.
    2. It uses if commands.
    3. If so, use commands upon window.

  3. #23
    Just Joined!
    Join Date
    Oct 2010
    Posts
    1

    My solution using a shell script, xmacro, and keyboard shortcuts

    I wrote a shell script that uses Xmacro. The purpose of my script is to run a series of keystrokes in Inkscape whenever I press CTRL+J.

    I Installed Xmacro, ran xmacrorec to get the key events, then put them in a script. I have Ubuntu run the script whenever I press CTRL+J- configured with the Keyboard Shortcuts control panel. Use "sh [script_name.sh]" as the command to run your script.

    Code:
    # This script uses xmacro
    #  (See xmacrorec and xmacroplay)
    
    # Intended to be used with <Left-CTRL> + J
    
    # Inkscape key mapping
    #
    # Event button will:
    #    Switch to the node tool, select all nodes, set symmetric
    #
    
    # Be sure to release the trigger keys before running the key sequence
    
    keys="
    
    KeyStrRelease Control_L
    KeyStrRelease J
    
    KeyStrPress F2
    KeyStrRelease F2
    KeyStrPress Control_L
    KeyStrPress a
    KeyStrRelease a
    KeyStrRelease Control_L
    KeyStrPress Shift_L
    KeyStrPress Y
    KeyStrRelease Y
    KeyStrRelease Shift_L
    
    "
    
    echo $keys | xmacroplay $DISPLAY
    I hope this helps!
    Bral

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •