Utility for repeating a key while held down for gameing?

Hey guys,
I've recently started playing a MMO game again that requires a lot of keyboard button spamming.
When I played this game on windows I used the AutoHotKey utility to write a script to repeat the key while I had it held down. Are there any utilities out there that I could use that would allow me to repeatedly send keyup/keydown events while I hold down a key? Preferably one that allows me to configure it to only do this when a specific window is focused.
If nothing already exists like this, I was planning on writing a very small utility in C that would do this.

xdotool would certainly work for sending keyup / keydown. But Is there a way I can make the script only do this when I'm holding down a key?
I suppose it may look something like this:
while true
do
# Do something to block while key isn't down
xdotool keydown --window $winid "x"
xdotool keyup --window $winid "x"
done

Similar Messages

  • Mac thinks keyboard key being held down

    i have a mac pro 2,1 running 10.6.8.  intermittently, it behaves as if a button is being held down on the keyboard.  sometimes when i start up and reach the login screen there is immediately a string of password already typed in.  as soon as i hit delete to clean i out and type my actual password, there is no problem.  then when i arrive at my desktop, there will be the clicking sound like a key is being held down, and again, if i just hit a key, the clicking noise stops.  all of this is no big deal, but the bummer is that when i put it to sleep, it often wakes back up immediately, or later on in the middle of the weekend and sits there waiting for me for days.  ive tried resetting pram / smc.  unplug/replug.  no firmware updates for my aluminum keyboard are popping up in software updates.  any ideas?

    Turning off hardware acceleration worked in all cases.
    With hardware acceleration enabled the menu flashing did not occur on the primary display, only the secondary display of a two-monitor system.
    Windows 7, ATI Radeon 4800 series.

  • Drawing Tools Acting As If Shift Key Being Held Down

    Hey guys,
    Small problem here with Adobe Acrobat Reader 8.0.0. When drawing square, oval, etc., the shapes are coming up as if the Shift Key was being held down. This also happens when trying to draw a box to place a digital signature. Check my keyboard, and there was nothing stuck in it that might be pressing the Shift key. Tested out by using Microsoft Paint to draw lines and they seem to work fine, so I think the problem is only in Adobe. I couldnt find anything online regarding this issue, which was kinda hard to put into words anyways into a search engine. Ive tried running the repair installation of Adobe, but no result. Any idea what might be causing this?

    Yes, that looks all like symptoms of a pressed Shift button.
    If you want to uninstall and reinstall Firefox then make sure to delete the Firefox program folder to make sure that there aren't any leftover files in it.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    You can find the latest Firefox release in all languages and for all Operating Systems here:
    *Firefox 16.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.
    *http://windows.microsoft.com/en-US/windows7/Advanced-startup-options-including-safe-mode
    *http://windows.microsoft.com/en-US/windows-vista/Advanced-startup-options-including-safe-mode

  • Firefox 4.0 The menus flash like a keyboard key is held down. Can't access them even with all plugins turned off. Same issue on multiple machines with different versions of Windows. How can this be resolved?

    FF 4.0. The menus flash like a key is being held down making them inaccessible. The problem persists with all plugin's turned off. Firefox box in top left corner not showing. The old FF logo show there instead.

    Turning off hardware acceleration worked in all cases.
    With hardware acceleration enabled the menu flashing did not occur on the primary display, only the secondary display of a two-monitor system.
    Windows 7, ATI Radeon 4800 series.

  • How do you disable repeat when key is down?

    When you press a key on your keyboard and hold that key down
    (the "A" key for example), after a second or so, it would start to
    repeat (so you would get "AAAAAA..." depending on how long you hold
    it down). This is really inconvenient for me in Flash and was
    wondering if there is a way to disable this or stop this from
    happening.
    I have this code in a file:
    stage.addEventListener(KeyboardEvent.KEY_DOWN, moveBox);
    I only want the moveBox function to be executed once, but if
    a key is held down for longer it executes multiple times.
    Thanks in advance for any help.
    -Robert K.

    An approach to try is to remove the event listener in the
    listener function for the keyDown event and then add the event
    listener again in the keyUp event listener.
    TS

  • Sending keystrokes with keys held down

    Hello,
    I am trying to develop a program which will allow me to send keystrokes to another application (possibly not Java) based on a programmatically produced script. Similar to a macro program.
    Ideally, I would like to be able to send keystroke combinations including periods where 1 or more keys are held down (other than normal control keys such as SHIFT and ALT). For example, I would like to be able to send keystrokes to another program to mimic this script:
    KEY "a": hold down for 10 seconds, do nothing for 5 seconds, tap once.
    KEY "b": do nothing for 12 seconds, tap, wait one second, tap, tap.
    KEY "c": hold down for 5 seconds, pause 10, hold down for 5 seconds
    Key "d": pause 5 seconds, hold down for 10 seconds, pause for 5
    etc
    ...where each key's script is run simultaneously, ie, the 3rd second of the script will see key "a" being held down, and key "c" held down. The 12th second will see the "b" key tapped once while the "d" key was held down.
    My intention is to use such a program to drive others which use the keyboard for input, but not as typed keys, but rather as buttons.
    Does anyone have any ideas on how this could be done?

    I'm not sure, but could the Robot class work for you?
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html

  • P35 Neo Combo behaves as though the escape key is being held down

    When I try to boot my computer, after it gives the initial few beeps it begins to emit a rapid clicking/beeping sound, which I recognize as the "keyboard buffer full" beep that you get when you hold down a key.  As the computer goes through its POST, it becomes apparent that the computer is acting like the escape key is held down.  This doesn't go away even after the OS comes up (I use Ubuntu Linux) and it prevents me from being able to use my computer. 
    I tried loading the default bios settings (which is hard when the BIOS keeps asking you if you want to discard changes and reboot the computer).  I have tried clearing the CMOS.  None of this has worked.
    I have tested the motherboard with several known-working USB and PS/2 keyboards, and the behavior remains.
    This happened once before, and I had to RMA the motherboard.  This is my work computer and I can't afford to wait 2 weeks for it to be fixed, especially if it's going to break again.  If anyone has any suggestions or has encountered this problem before, I would appreciate your help.

    Quote from: Frankenputer on 07-August-08, 02:58:21
    You are basing an opinion about a company from one board? All manufacturers, yes, even Intel, has sold a board that had to have an RMA.  Many times it's a user error rather than the board, but also it's boards that are defective. Basing an opinion based on the experience with one board is not a sound strategy. 
    False.  I've had a variety of bad experiences with MSI products.  Out of 4 MSI products I've bought and used over the past 2 years, all but 1 have needed repair or replacement.  The one good item is a video card.
    Quote from: Frankenputer on 07-August-08, 02:58:21
    In the USA, where I am, MSI MOBOs carry a 3 year warranty(as do VGAs)). So, your statement that your new board has a 3 year warranty which reads as implying that the MSI one does not is false.
    http://www.msicomputer.com/support/sup_genwar.asp
    The MSI warranty only covers labor for up to 2 years.  The Intel warranty maintains the same terms for all 3 years.
    Quote from: Frankenputer on 07-August-08, 02:58:21
    Your statements after "I'm going to RMA this MSI unit" are unnecessary and bashing. There's no need to bash.
    It's not bashing, it's a fact.  It's not unnecessary, it's cautionary.
    This motherboard has failed in this manner twice now.  This failure makes it totally unusable, and causes a severe disruption in my productivity.  As a software developer, I need my computer to work for more than 4 weeks at a time.  In addition, the network chipset failed a few weeks ago and I've been using a 3com card since.
    The last time I RMAd this unit for this same error, it was returned in working order but with no indication of what had gone wrong.  MSI has arranged their company to discourage customer interaction on any meaningful level, so there's no way for me to find out from MSI what they did to fix my board so that I could conceivably avoid another 2-week RMA ordeal.
    If you want a cheap motherboard for a non-critical application, MSI is probably fine.  For a mission-critical workstation, look elsewhere.

  • Mac acting as if the apple key is stuck down+ pram reset not working

    My Mac pro has started acting as if the apple key is held down! Menus and cursers are all wrong or not working at all. Rebooting cures it for a few hours but sometimes only a few minutes, I've tried swapping keyboards ( twice ) and using diffrent usb sockets without any joy so I'm starting to think it's a system problem. One suggestion I read was to reset the pram but even that won't work. Holding down the command / option / P / R combo at start up doesn't do anything.
    HELP!  PLEASE

    Boot off your *original* Install Disk while holding down the *d key*, (not c key), then run the extended Apple Hardware Test. Some disks require you to use the Option key at bootup to select AHT. Some Discs have it inexplicably on Disc #2. Some models have a separate AHT CD.
    The Memory test can really only be trusted if it finds a problem, not if it doesn't find a problem.
    Memtest OS X...
    http://www.memtestosx.org/joomla/index.php
    Rember is a freeware GUI for the memtest ...
    http://tech.kateva.org/2005/10/rember-freeware-memory-test-utility.html
    Have you blown the dust out lately?
    Get Temperature Monitor to see if it's heat related...
    http://www.macupdate.com/info.php/id/12381/temperature-monitor
    iStat Menus...
    http://bjango.com/mac/istatmenus/
    And/or iStat Pro...
    http://www.islayer.com/apps/istatpro/

  • Satellite A300 thinks button is held down and won't start up (long)

    Hey sorry this is so long but I would really love some help,
    Ok so I was just wondering if there is a way to fix this...
    I was on my Satellite A300 (just over a year old) last night playing the Left 4 Dead 2 Demo using the Stream network and all of a sudden in Online Co-op the Camera Assistant Window opened minamising Left 4 Dead 2.
    I thought this strange because I had closed the side popup bar for Camera Assistant on startup so that it wouldn't popup and do exactly what it did....
    So after being confused I just clicked back onto Left 4 Dead 2 and thought "I'll deal with that in a sec"... When Left 4 Dead 2 did maximise again, (it took a few moments where there was a black screen and about 1 second of audio looping), I couldn't physically play but I could watch the game in a special mode that lets you take a break and let AI take over for a while. Also the in game chat box was up.
    I was at first just trying to click the button to turn off AI control but the game wouldn't respond. Then my chat box's typing section started filling up with 'u's so I tried to get rid of them. All I could do was high-light them with my mouse and then more 'u's would replace them.
    After trying Alt+F4 for a while and Ctrl+Alt+Del with no responce except for the 'u's I decided the poor computer must be strained with Left 4 Dead open and Stream, Illistratror and the Camera open in the background so I pressed the power button (set to shut down on my computer) and waited...
    Left 4 Dead 2 closed, as did Camera Assistant I think... and then it kind of froze so I just held down the power button (sorry I know that probably wasn't the best move) and my laptop turned off...
    Well when I tried to turn it back on the Black "Toshiba Leading Innovation" screen pops up along with the little footer explaining what F2 and F12 do. After that the screen switches to the little blinking text bar thing (sorry I don't know what it's actually called...) but the bar flashes on and remains there for about 4-5 seconds and then flashes off and on again, although it seems slightly duller in colour) and then a single tone plays (from the computer even if earphones are plugged in) and yeah... I have to turn it back off...
    Remembering about the 'u's I assumed the computer was not happy that the 'u' button was being held down on startup so remembering that the fron of the keys are actually removable I (very carefully) removed the 'u' faceplate.It all looked 'normal' underneath... (I compared it to the 'y' button) and so pressed it a few times and re-placed the faceplate. Turned on the compter... Same thing happened...
    I then tried taking out the battery and then putting it back in to see if that would help... Again, the tone played... I took unpluged my iPod, Took out the CD, and removed the Memory Card to see if that would help... It didn't unfortunately.
    So next I tried turning on the computer whist pressing 3 keys (I thought it might cancel out the 'u' key) abd held down 'b+n+m'. The first time I did this Windows Boot Manager opened instead of the beeping. I only have Windows Vista so when I tried to continue by pressing 'enter' nothing happened... So I turned off the computer and tried again (this time with q+w+e as I thought maybe holding b+m starts Boot Manager). This time Windows Error Recovery displayed with the options; Safe Mode, Safe Mode with Networking, Safe Mode with Command Prompt and Start Windows Normally. Again Enter wouldn't work... And thats my sistuation so far...
    Please help if you can >: I'm scared if I take it to a Japanese Compute Person they'll wipe everything...
    Thankyou,
    Rochelle
    (again I am sorry this is so long but I thought people might wan't specifics...)

    hi Ellehcore,
    sure it is always the hardware.... nope!
    deinstall the webcam software and/or shutdown the webcam service
    this will prevent the software to show up in your game...
    but with this extended problems you should ask a servicepartner for assistance....
    or simply recover the system...

  • Touch Events: How can I check for a button being pressed while another button is being held down?

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

  • Help! when i turn on my mac while holding down the option key to swith from windows to mac (i have just installed windows via bootcamp) it comes up with a white screen with a grey padlock asking for a password.

    I have not installed the windows drivers yet if that is relevant. here is a video of the problem https://www.youtube.com/watch?v=xR9dQPSIyNg

    Welcome to the Apple Support Communities
    That's the EFI password. If you don't know the password, the only thing you can do to turn it off is to take the Mac to an Apple Store.
    If you know the password, follow these steps to turn your EFI password off:
    1. Press Command and R keys while your Mac is starting to start into OS X Utilities.
    2. Go to Utilities menu > Firmware Password Utility, turn it off and restart your Mac

  • HT1495 I recently "held down the shift key" and created (and named) a new library, it's completely lost all my music on my iTunes ac! I still have it on my iPad, can I transfer all my iPad music from my iPad to a new iTunes ac (as I had to uninstall and i

    Ive had an iPad for a year or so, it's got tons of music on it. I recently got myself an iPhone. I read on here about how to set up a completely separate library using my same account (as my iphone couldn't possibly hold the same amount as my pad I thought it made sense!). Trouble is....as I set up a new library it asked me to name it, which I did. The trouble is now, every time I log in to iTunes it logs into the new library which is completely blank. It has of course not effected my music on my pad (phew!), I cannot find my original iTunes a/c anywhere on my pc. In desperation I tried to uninstall the iTunes off my pc, then reinstall, and log into my original a/c hoping all would be revealed thanks to the iCloud, but no.....it's blank! Is there anyway of copying (safely) all of my music and films FROM my iPad ONTO my new blank iTunes account?? Any help would be greatly appreciated!!

    The trouble is now, every time I log in to iTunes it logs into the new library which is completely blank. It has of course not effected my music on my pad (phew!), I cannot find my original iTunes a/c anywhere on my pc.
    Okay, try launching iTunes while holding down the shift key (again) but this time, click "Choose library". Browse to the location of the old library file. The default locations of the library file are inside the iTunes folder described in the following table:
    Operating System
    Default location of iTunes Folder
    Mac OS X
    /Users/[your username]/Music
    Microsoft Windows XP
    \Documents and Settings\[your username]\My Documents\My Music\
    Microsoft Windows Vista
    \Users\[your username]\Music\
    Microsoft Windows 7
    \Users\[your username]\My Music\
    Find and open the library file. Are you seeing your normal library now?

  • How do I resolve this error message? The iPhoto library is on a locked volume.  Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library.

    How do I resolve this error message? The iPhoto library is on a locked volume.  Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library.

    Hi j,
    I don't know if this will work, but I'd try logging in to an admin account, going to your main library (not user library), opening it, opening Application Support, selecting iPhoto, hold down the command key and press i, click on the lock in the lower left, entering the password and making sure you have Read & Write privileges for System and Admin.

  • I have lost my Safari app and all the bookmarks that go with it. I have tried to download my back-up on external drive but cannot access it. Tried a start with C key held down but still no access to the back-up app.

    I have lost my Safari app and all the bookmarks that go with it. I have tried to download my back-up on external drive but cannot access it. Tried a start with C key held down but still no access to the back up app.
    Have used Superduper app. to back up and checked back-up occasionally to see if all files present  and appeared OK.
    I had previously started machine using original CD #1 to try and replace Eudora which was acting up. Did not knowingly touch Safari.
    Running iMAC System 10.4.11
    How can I successfully download from the Maxtor back-up?
    Ivan

    Further info.
    I checked the content of my other back-up and found the bookmark Bookmarks.plist in the library under Safari
    Dumped the existing copy in the computer and drag-dropped the back up. All bookmarks restored.
    Solved the Stickies problem by using Spotlight  to find file "stickiesdatabase" and did a drag- drop to replace file. All data restored.
    Re Ical data loss. Used Spotlight to find iCal document in  Library - Preferences where I found com.apple.iCal.plist in folder.
    Got ready to make change but did not immediately remove file. When I returned to Preferences folder to grab above document,
    the readable descriptors had been changed to code consisting of some upper case letters and/or single symbols!
    So now I cannot tell which is the symbol  iCal.plist
    Thanks for leading me so far, but how do I find that plist for my calendar?

  • The iPhoto library is a Time Machine backup, and so cannot be used as the main library. Reopen iPhoto with the Option key held down to choose another library.

    I recently tried to look up my pictures on my time machine back up on an external hard drive. As soon as I try to open it I get the following message.
    "The iPhoto library is a Time Machine backup, and so cannot be used as the main library. Reopen iPhoto with the Option key held down to choose another library."
    I have tried holding down the option key but still couldn't few the photos.
    I want to know if there is anyway I can actually view these photos. I have over 85gbs of photos on the hard drive.  I have tried googling and looking at pervious forums with the same problem but nothing is working.
    Please help!

    Select Mac Help from the Finder's Help menu. Search for "Restore items backed up with Time Machine."

Maybe you are looking for

  • How to resolve lag on ios 8.1

    why does my ipod lag, specifically when grabbing either the control center, notification center, or simply scrolling in the app center or in the settings app, and why does my music app sometimes crash when I open it. even after I have closed all all

  • Win XP Installation on MS-6528 LE

    Hi, I have Dos/v pc that uses MSI MS-6528 LE mother board. It is nearly 14 months old. I never had problem before. Few days ago, whil I was internet it shuts the system. First I thoutg it must be some virus causing this. But I couldnt power on my pc.

  • Business Content  instaletion Failed

    Hi All, when i am instating Business Content Object, ofter that i go to SM37 to see the background Job's . i saw Object <b>Status is Canceled</b> . Thank u All

  • Task/appointment in the groupware (outlook) is not replicated to the CRM

    Hi all, Someone can to help my friend about a Groupware question?  TKS "However, when we create a task or appointment in the groupware (outlook) this activities is not replicated to the crm. Hope you give me some hints to solve this problem." All con

  • How to argue about cencorship on a post I made?

    Hi, Earlier today I made a post http://discussions.apple.com/message.jspa?messageID=8070448#8070448 and it was edited (censored) by a moderator. I was merely arguing the level of necessity for a feature and my willingness to void my warranty (it is w