Search Results

Search found 219 results on 9 pages for 'keystrokes'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • How do I capture keystrokes on the web?

    - by Sean
    Using PHP, JS, or HTML (or something similar) how would I capture keystokes? Such as if the user presses ctrl+f or maybe even just f, a certain function will happen. ++++++++++++++++++++++++EDIT+++++++++++++++++++ Ok, so is this correct, because I can't get it to work. And I apologize for my n00bness is this is an easy question, new to jQuery and still learning more and more about JS. <script> var element = document.getElementById('capture'); element.onkeypress = function(e) { var ev = e || event; if(ev.keyCode == 70) { alert("hello"); } } </script> <div id="capture"> Hello, Testing 123 </div> ++++++++++++++++EDIT++++++++++++++++++ Here is everything, but I can't get it to work: <link rel="icon" href="favicon.ico" type="image/x-icon"> <style> * { margin: 0px } div { height: 250px; width: 630px; overflow: hidden; vertical-align: top; position: relative; background-color: #999; } iframe { position: absolute; left: -50px; top: -130px; } </style> <script> document.getElementsByTagName('body')[0].onkeyup = function(e) { var ev = e || event; if(ev.keyCode == 70 && ev.ctrlKey) { //control+f alert("hello"); } } </script> <div id="capture"> Hello, Testing 123<!--<iframe src="http://www.pandora.com/" scrolling="no" width="1000" height="515"frameborder="0"></iframe>--> </div>

    Read the article

  • Mac OSX snow leapord move to folder on keystroke

    - by Georges Oates Larsen
    On a weekly basis I have to organize thousands of photos (in groups of up to five thousand) into folders depending upon what they contain (to then narrow them down to the best photos of the same thing). This means I am constantly scanning through photos and organizing them into a folder. THe problem is, the process of stopping my scan, then dragging the photo all the way into a folder myself is bogging me down. Would it be possible to, for instance using something like applescript, or even going so far as using XCode/Cocoa, to create a shortcut that moves whatever I have selected in the finder to a pre-specified folder? Does somethign like this already exist?

    Read the article

  • How do you move the pointer up or down multiple lines with Emacs?

    - by Peter
    I can move my pointer up and down one line with my arrow key just fine in Emacs, so I'd like to redefine C-n and C-p to move up and down 5 lines at a time. I'm just beginning to learn how to use Emacs, and elisp is very alien to me. I tried using the GNU Emacs lisp reference, but I couldn't find how to bind a keystroke to multiple commands. Here's what I have so far (concentrating on the moving up definition): (global-set-key "\C-p" '(loop for i in '(1 2 3 4 5) do ('previous-line))) But, this brings up an error message when I hit C-p, "Wrong type argument." Any suggestions? Thanks!

    Read the article

  • I can't prevent key presses from changing a selected option in Firefox

    - by Anthony
    Using Firefox 3.5.7 The following test page should behave like Opera, Safari and Chrome. Key presses (arrows or 1-5) should have no effect (i.e. The events should be cancelled so that the number never changes from the initial default "3"). [I have separate working code for IE too]. Many thanks to anyone who can make it work? <html> <head> <title>Test</title> <script type='text/JavaScript'> function stop(evt) {evt.preventDefault(); evt.stopPropagation(); }; </script> </head> <body> <select onkeydown='stop(event);' onkeypress='stop(event);'> <option>1</option> <option>2</option> <option selected="selected">3</option> <option>4</option> <option>5</option> </select> </body> </html>

    Read the article

  • Send keystrokes simultaneously to both host and slave over internet?

    - by donodarazao
    I would like to watch movies with a friend who lives far away from me. For this, the playback should be synchronized on both our pc. However, we have some constraints: Due to our low bandwidth internet, any form of streaming solution wouldn't work. We do however both have the same copy of the movie on our harddisks. We use movies to learn languages and because of this, we very frequently pause and rewind. The typical "3...2...1...go!" solution over skype wouldn't work because it would soon get out of sync. I imagine an approach that sends keystrokes simultaneously to both our pc would work (for example, if I press space to pause the movie at my pc, space should also be send to his pc). Any ideas how this could be realized? I looked into Synergy and InputDirector, but both neither seem to be an option, because I don't want to see the desktop of my friend, I want to see my desktop Keystrokes should be sent simultaneously to both pc, not just to one pc We have both Windows 7x64, and we might use any media player (VLC, XBMC,...).

    Read the article

  • algorithm to generate maximum number of character 'A' using keystrokes 'A', CTRL + 'A', CTRL + 'C' and CTRL + 'V'

    - by munda
    This is an interview question from google. I am not able to solve it by myself. Can somebody throw some light? The question goes like this. Write a program to print the sequence of keystrokes such that it generates the maximum number of character 'A's. You are allowed to use only 4 keys: 'A', CTRL + 'A', CTRL + 'C' and CTRL + 'V'. Only N keystrokes are allowed. All CTRL+ characters are considered as one keystroke, so CTRL+A is one keystroke. e.g.: A, ctrl+A, ctrl+C, ctrl+V generates two As in 4 keystrokes. Edit: CTRL + A is Select All CTRL + C is copy CTRL + V is paste I did some mathematics. For any N, using x numbers of A's , one CTRL+A, one CTRL+C and y CTRL+V, we can generate max ((N-1)/2)^2 numbers of A's. But for some N M, it is better to use as many ^A, ^C and ^V as it doubles the number of As. Edit 2: ^A, ^V and ^C will not overwrite on the existing selection but it will append the copied selection to selected one.

    Read the article

  • iPhone/Android: How to Send Keystrokes To Laptop Over Wifi?

    - by Cirrostratus
    How can I best implement a system for send keystrokes/commands via an iPhone and/or Droid to a desktop or laptop computer via WiFi or bluetooth? There are apps for VLC, Keynote and other applications that do this, so I know it's possible but don't know what technology base to use. The implementation is probably different on Windows and OS X, but if they could be similar that'd be a big win. If VNC-type technology is used, that'd be fine but I only need to send key commands and mouse clicks—I don't need to be able to navigate the screen space.

    Read the article

  • Goldtouch USB Keyboard reverses keystrokes in fast typing -- expected?

    - by Justin Grant
    I am running into an odd keyboard problem: some key combinations end up reversed (e.g. "pl" ends up being emitted as "lp") when I'm typing quickly. The problematic ones are the key combos I hit with two adjacent fingers on my right hand-- in other words, the combos I can hit the fastest. No idea how fast is "fastest", but I guess around 50-150 msecs gap between them. I'm trying to track down whether this represents a failed keyboard, an inherent limitation of my Goldtouch USB keyboards, or a software problem on my Windows 7 Lenovo T500. I use a PS/2 version of the same Goldtouch keyboard at home with no problems. I've tried another USB keyboard with my laptop and can't repro the problem. I've also used this keyboard on other laptops without a problem. According to this SU thread, USB keyboards have higher latency than PS/2 keyboards-- up to 30 msecs. I find it hard to imagine that I can type key combos faster than 50 msecs, probably more like 100-150. Anyone encountered this problem with this or another keyboard? If so, how did you fix it? Any idea if there's a "keyboard log" or some way to diagnose the problem inside Windows?

    Read the article

  • batch file that detects keystrokes. how?

    - by daniel11
    im designing a collection of video games for the command line (such as deal or no deal, tic tac toe, racing, maze puzzle, connect four, wack a mole, etc.) however it would really make things easier for me if i could make it so that when the user makes a selection (such as what direction to move in the game) , that as soon as they press the arrow keys then it carries out the IF statements that follow. Instead of having to press enter after each selection. something like... :one1 set /p direction1= : IF %direction1%== {ARROW KEY LEFT} goto two2 IF %direction1%== {ARROW KEY RIGHT} goto three3 IF %direction1%== {ARROW KEY UP} goto four4 IF %direction1%== {ARROW KEY DOWN} goto five5 goto one1 Any Ideas?

    Read the article

  • C#: Windows Forms: Getting keystrokes in a panel/picturebox?

    - by Rosarch
    I'm making a level editor for a game using windows forms. The form has several drop down menus, text boxes, etc, where the user can type information. I want to make commands like CTRL + V or CTRL + A available for working within the game world itself, not text manipulation. The game world is represented by a PictureBox contained in a Panel. This event handler isn't ever firing: private System.Windows.Forms.Panel canvas; // ... this.canvas = new System.Windows.Forms.Panel(); // ... this.canvas.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.canvas_PreviewKeyDown); What is the preferred way of doing this? Can a panel even receive keyboard input? I would like to allow the user to use copy/paste/select-all commands when working with the text input, but not when placing objects in the game world.

    Read the article

  • Getting the Value of a UITextField as keystrokes are entered?

    - by Nocturne
    Let's say I have the following code: IBOutlet UITextField* nameTextField; IBOutlet UILabel* greetingLabel; I'd like the greetingLabel to read "Hello [nameTextField]" as soon as the user presses any key. What I need basically is the iPhone equivalent of the Cocoa delegate method -controlTextDidChange: The -textField:shouldChangeCharactersInRange: delegate method is called each time a keystroke occurs: - (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string The string argument returns the character that is pressed. The actual textField's value (nameTextField.text) remains blank however. What am I missing here? (I'd like nameTextField to reflect the exact string that the user has entered so far)

    Read the article

  • Is there a way to tell if a program like KeyScrambler is first in the list of keyboard driver filter

    - by Brian T Hannan
    I recently found a program called KeyScrambler which appears to be a keyboard driver filter that intercepts keystrokes and jumbles them up for you so keyloggers aren't able to get your keystrokes while visiting your online banking sites. I was wondering if there is a way to tell if KeyScrambler is always first in line for the keyboard driver filters or if another driver filter could be installed and intercept the keystrokes before it gets to KeyScrambler.

    Read the article

  • Erratic typing in Ubuntu 13.04

    - by spencerrecneps
    I recently upgraded to 13.04 and have noticed that my keyboard randomly drops keystrokes. Furthermore, it will occasionally cause the last pressed key to "stick", leaving me with "typng that looks lik thisssssssssssssssssssssss". I do not believe that this is a hardware problem, as the keyboard worked just fine under 12.10 a few days ago. In addition, there are no Universal Settings turned on that would be causing this problem. I came across this unanswered Ask Ubuntu post that seems to identify part of my problem: Missing keystrokes in ubuntu 13.04 I was able to work around the repeated keystrokes problem by turning off the "key presses repeat when key is held down" option under the keyboard settings, but this is not an acceptable solution in the long term. Any thoughts?

    Read the article

  • Mini keyboard has no home/end keys; how to type them?

    - by Steve Crane
    Some months ago I needed a small keyboard and bought an Okion KM229 without noticing that it has no Home or End key. This makes it tricky to type as I'm so used to using these keys. I haven't yet figured out if there is a key combination that issues Home and End keystrokes. Does anyone have experience of these keyboards and know how to issue those keystrokes? The keyboard is used on a PC running Windows XP. I have used the contact form on the Okion USA web site to ask this question but received no response. Wikipedia suggests that Home and End keystrokes are issued with Fn-Left and Fn-Right on some limited size keyboards. I may have tried those but don't remember for sure. I will try them again though when I am on site again in a week or so. Any other thoughts would be welcomed in the meantime.

    Read the article

  • Easy to use AutoHotkey/AutoIT alternatives for Linux

    - by Xeddy
    Hi all, I'm looking for recommendations for an easy-to-use GUI automation/macro platform for Linux. If you're familiar with AutoHotkey or AutoIT on Windows, then you know exactly the kind of features I need, with the level of complexity. If you aren't familiar, then here's a small code snippet of how easy it is to use AHK: InputBox, varInput, Please enter some random text... Run, notepad.exe WinWaitActive, Untitled - Notepad SendInput, %varInput% SendInput, !f{Up}{Enter}{Enter} WinWaitActive, Save SendInput, SomeRandomFile{Enter} MsgBox, Your text`, %varInput% has been saved using notepad! #n::Run, notepad.exe Now the above example, although a bit pointless, is a demo of the sort of functionality and simplicity I'm looking for. Here's an explanation for those who don't speak AHK: ----Start of Explanation of Code ---- Asks user to input some text and stores it in varInput Runs notepad.exe Waits till window exists and is active Sends the contents of varInput as a series of keystrokes Sends keystrokes to go to File - Exit Waits till the "Save" window is active Sends some more keystrokes Shows a Message Box with some text and the contents of a variable Registers a hotkey, Win+N, which when pressed executes notepad.exe ----End of Explanation---- So as you can understand, the features are quite obvious: Ability to easily simulate keyboard and mouse functions, read input, process and display output, execute programs, manipulate windows, register hotkeys, etc.. all being done without requiring any #includes, unnecessary brackets, class declarations etc. In short: Simple. Now I've played around a bit with Perl and Python, but its definitely no AHK. They're great for more advanced stuff, but surely, there has to be some tool out there for easy GUI automation? PS: I've already tried running AHK with Wine but sending keystrokes and hotkeys don't work.

    Read the article

  • is there a way to switch bash or zsh from emacs mode to vi mode with a keystroke

    - by Brandon
    I'd like to be able to switch temporarily from emacs mode to vi mode, since vi mode is sometimes better, but I'm usually half-way through typing something before I realize I want I don't want to switch permanently to vi mode, because I normally prefer emacs mode on the command line, mostly because it's what I'm used to, and over the years many of the keystrokes have become second nature. (As an editor I generally use emacs in viper mode, so that I can use both vi and emacs keystrokes, since I found myself accidentally using them in vi all the time, and screwing things up, and because in some cases I find vi keystrokes more memorable and handy, and in other cases emacs.)

    Read the article

  • WinXP Parallels Guest with OS X host -- communication between the two?

    - by Justin
    The setup: Windows XP guest OS running inside Parallels 5 on a OS X 10.6.2 host. I have a win32 application that runs in windows that communicates with other programs by sending out keystrokes to the program in focus. I can run this software inside parallels just fine, but I need a way for it to communicate (via keystrokes) with native OS X applications. For instance, the windows software sends out a continuous stream of a's and w's, based on the program input from an external source. On the other side, I have a Mac version of VLC media player with hotkeys set up for a and w for the two functions I would like to manipulate from the windows software. How can I set up a link between the guest and host OS's with Parallels that lets a windows program send keystrokes to a mac program?

    Read the article

  • Compiz command plugin won't register keyboard shortcuts

    - by David Moles
    Per this discussion I've enabled the Compiz commands plugin in order to try to bind some keyboard shortcuts to wmctrl actions. CCSM captures my keystrokes just fine, but no matter what keystroke I try or what command I bind it to (everything from my original intention of binding Super-1, Super-2 etc. to wmctrl -o 0,0, wmctrl -o 2560,0, etc., to binding Ctrl-Alt-Shift-L to gnome-terminal). Basic compiz shortcuts for window switching and so on -- even custom ones -- seem to work fine, but the command plugin doesn't seem to be working at all. I also notice the following symptom: when I open the keyboard shortcut tab in CCSM, the keyboard shortcuts often at first appear blank, though if you click on the blank button, the correct value is still there. Also possibly related, I've noticed that gnome-terminal doesn't seem to notice the Super key, though other apps (e.g. CCSM, Emacs) register it fine. Anyway, it seems like something's eating my keystrokes. Any ideas?

    Read the article

  • Reflective practice in programming using keystroke playback

    - by Graham
    I'm thinking of applying Reflective Practice to improving my programming skills. To that end, I want to be able to watch myself writing code. In general, what is a good method for applying Reflective Practice to the craft of programming? In particular, if it's a good idea, is there an editor that records keystrokes then plays them back at a later time - possibly running the keys together without delays, or replaying at a 2x/4x/8x accelerated rate? Screencasting with RecordMyDesktop is an option, but has downsides of waiting for encoding and ending up with a big video file instead of a list of keystrokes.

    Read the article

  • Magnetic Stripe Reader over Terminal Server has random Uppercase/Lowercase nonsense

    - by Peter Turner
    The Magnetic Stripe Reader that I'm using and testing is just supposed to be sending keystrokes. Unfortunately, it seems to randomly be sending upper case and lower case keystrokes, sometimes substituting % for 5 and ^ for 6 and vice versa. (If you've ever programmed for a magnetic strip reader, you know that's not a good thing.) Is there something in the RDP protocol that causes this? I've got kind of a convoluted system, running XP inside virtualbox on Fedora 11 RDP'ed into a win2k3 server. It works on the XP VM and it doesn't work on the RDP'ed one. What's weirder, is that I'm not even emulating the USB drivers for my Mag Card Reader. Linux is sending keystrokes straight in to windows, and MSTSC on windows XP is sending crap to the Win2k3 server. I'm 99% certain this isn't a problem with the card reader, it has nothing to do with my programming either. (I get the same junk coming into notepad that I get coming into our software [that's why I didn't ask on SO]). And, it works with rdesktop programs other than MSTSC.exe! Needless to say, I'm in need of some RDP Guruship.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >