Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
Is there a program for X which will do some or all of what AutoHotKey does for Windows?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Location
    Hastings, New Zealand
    Posts
    12

    X macros like AutoHotKey for Windows


    Is there a program for X which will do some or all of what AutoHotKey does for Windows?

  2. #2
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    What does AutoHotKey do?

  3. #3
    Just Joined!
    Join Date
    Aug 2007
    Location
    Hastings, New Zealand
    Posts
    12

    Redefine multiple keystrokes

    I am trying to convert to Linux. But to keep up my productivity level, I need to be able to define multiple keystrokes for specific X windows.

    For example, in Open Office Writer I want to be able to use the 2 key sequence "Ctrl-Q,Ctrl-S" to move the cursor to the beginning of the line (i.e. this sequence should send the {Home} keystroke) and the sequence "Ctrl-Q,Ctrl-D" to move the cursor to the end of the line (i.e. this sequence should send the {End} keystroke).

    Is there anything I can use to accomplish this for X windows? At present I use the very powerful AutoHotKey in Windows to accomplish this. I don't need something as powerful as AutoHotKey. I just need to be able to intercept X key events, do a little scripting and then send X key events.

    bhoyt

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2007
    Location
    Hastings, New Zealand
    Posts
    12

    AutoHoytKey

    It is a simple but fairly complete programming language together with hooks into the OS to catch keyboard, mouse and other events from specified windows, handle them and send events to specified windows.

    I use it to program hotkeys, for starting programs from the keyboard and to redefine keystrokes for specific editors so they all work the way I want them to (i.e. from the keyboard) I rarely take my hands of the keyboard and every text editor and word processor and email program I use and all work the same.

    It's great.

    But I would like to switch to Linux. However I need some to do this so that I can keep up my productivity.

    bhoyt

  6. #5
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    I've not heard of such a program myself. However, flw once pointed out The table of equivalents / replacements / analogs of Windows software in Linux. (Official site of the table) which lists Linux equivalents to Windows programs. I've found it quite useful in the past and it may help you out

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by bhoyt
    I rarely take my hands of the keyboard
    Same here. Assigning shorcuts/functions to keys is the one of a few things which I do after fresh install of any distro.

    Gnome Desktop Environment maps all multimedia keys by default and you can re-assign those with gconf-editor and Keyboard Shortcuts.

    In KDE, you have to do it yourself.
    Execute xev command and note down keycode of key. Execute xmodmap command to assign whatever application/function you want to invoke.
    Code:
    xmodmap -e 'keycode 115=Menu'
    xmodmap -e 'keycode 174=XF86AudioLowerVolume'
    xmodmap -e 'keycode 176=XF86AudioRaiseVolume'
    xmodmap -e 'keycode 160=XF86AudioMute'
    xmodmap -e 'keycode 162=XF86AudioPlay'
    xmodmap -e 'keycode 162=XF86AudioPause'
    xmodmap -e 'keycode 161=XF86Calculator'
    xmodmap -e 'keycode 178=XF86WWW'
    xmodmap -e 'keycode 237=XF86AudioMedia'
    xmodmap -e 'keycode 236=XF86Mail'
    xmodmap -e 'keycode 235=XF86MyComputer'
    xmodmap -e 'keycode 230=XF86Terminal'
    Save above code in file, let say, key_map.sh and move it to ~/.kde/env folder. It will be autoexecuted on every login.
    Edit any/all shorcuts according to your needs.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined!
    Join Date
    Aug 2007
    Location
    Hastings, New Zealand
    Posts
    12

    But I need multiple keystrokes

    I know about modifying with Xmodmap. But I need multiple keystrokes mapped into one! e.g. "Ctrl-Q,Ctrl-S" should map to {Home}. Anything to do this with?

    bhoyt

  9. #8
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hi, bhoyt!

    I don't think there is currently a Linux equivalent, but is it possible that AutoHotKey might work under WINE?

    I've personally never used AutoHotKey or WINE, so I have no idea if it would work or if anyone has ever tried it, but it might be worth at least considering.
    oz

  10. #9
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    I was doing some Googling just now and came across this:

    Wine-doors About

    Changeset 843 for wine-doors - Wine Doors - Trac

    Now, I'm not sure what all that means, but it appears that wine-doors is offering, or at least working on trying to make AutoHotKeys work under Linux with WINE.

    Maybe someone else here that knows more about wine-doors, autohotkeys, and wine can fill in the blanks and explain what it all means.
    oz

  11. #10
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Which Desktop Environment are you using?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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