Results 1 to 3 of 3

Thread: How to create a custom keyboard shortcut to then run a wGet HTTP command?

  1. #1
    Join Date
    Jan 2013
    Beans
    22

    How to create a custom keyboard shortcut to then run a wGet HTTP command?

    Hello

    I am looking for a way in Ubuntu Minimal (No desktop UI) to be able to create a custom keyboard shortcut like Ctrl+Alt+1 and then have it run a wGet HTTP command.

    To do this in Windows I would create a .cmd file that contains a wGET HTTP command like:

    Code:
    wget --delete-after "http://192.168.1.100:3480/data_request?id=lu_action&output_format=xml&DeviceNum=3&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1"
    For example this HTTP command would tell my Home Automation system to do something, like turn on a light.

    In Windows I would then use AutoHotKey running in the system tray and a AutoHotKey script like:

    Code:
    ^!1::
    IfWinExist Untitled - Left Lamp On
    WinActivate
    else
    Run C:\Lights\Lounge-On-Left.cmd
    return
    ^!1 = Ctrl+Alt+1 and it then runs the command file C:\Lights\Lounge-On-Left.cmd.

    So when I pressed Ctrl+Alt+1 on the keyboard the Light would come on. I can then further program my Universal remote control, to send these custom keyboard shortcuts to the HTPC. So I can control my lights via my remote control.

    I have migrated away from Windows Media Center to Linux Ubuntu 12.10 minimal and XBMC. I am a Linux newbie and am looking for help on how I might do this under Linux?

    Any help greatly appreciated

    Thanks
    Last edited by cwkid; August 9th, 2013 at 09:42 AM.

  2. #2
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: How to create a custom keyboard shortcut to then run a wGet HTTP command?

    Hello,
    A quick search suggests 3 alternatives for AutoHotKey in Linux:
    http://alternativeto.net/software/Au...platform=linux

    However I've never used them and also you are running "Ubuntu Minimal (No desktop UI)", so I've no idea if they are useful to you or not!

  3. #3
    Join Date
    Jan 2013
    Beans
    22

    Re: How to create a custom keyboard shortcut to then run a wGet HTTP command?

    Hi thanks for the reply!
    Yes I have done some searching and seen there are some Linux alternatives to Autohotkey but as I am running Ubuntu minimal and with my lack of general Linux know how I was really unsure where to begin with something like this.

    Thanks

Tags for this Thread

Bookmarks

Posting Permissions

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