1. Keyboarding Assistance
- Posted by Funkbrat <funkbrat1 at yahoo.com> Feb 08, 2006
- 459 views
I need to know how to do proper keyboarding in DOS Euphoria. I want the keyboard to recognize a pressed key without a pause. Normally, it detects the key once, waits a short while, then continues to recognize the key again. I don't want that to happen. I want it to constantly receive the keypress at a smooth rate without a pause after the first time. How do I do it?
2. Re: Keyboarding Assistance
- Posted by don cole <doncole at pacbell.net> Feb 08, 2006
- 458 views
Funkbrat wrote: > > I need to know how to do proper keyboarding in DOS Euphoria. > > I want the keyboard to recognize a pressed key without a pause. Normally, > it detects the key once, waits a short while, then continues to recognize the > key again. I don't want that to happen. I want it to constantly receive the > keypress at a smooth rate without a pause after the first time. How do I do > it? Could we see a sample of your code that pauses. Don Cole A Bug is an un-documented feature. A Feature is a documented Bug.
3. Re: Keyboarding Assistance
- Posted by Funkbrat <funkbrat1 at yahoo.com> Feb 08, 2006
- 460 views
- Last edited Feb 09, 2006
don cole wrote: > > Funkbrat wrote: > > > > I need to know how to do proper keyboarding in DOS Euphoria. > > > > I want the keyboard to recognize a pressed key without a pause. Normally, > > it detects the key once, waits a short while, then continues to recognize > > the > > key again. I don't want that to happen. I want it to constantly receive > > the > > keypress at a smooth rate without a pause after the first time. How do I do > > it? > > Could we see a sample of your code that pauses. > > Don Cole I don't really have any code. Those were the wait_key() and get_key() commands I were talking about. What I want is to program my own keyboarding routines that repeatedly recognize a key from the keyboard without a pause, like for moving a player in a game, like a side-scroller or something. I just don't know how to do it. I'm not that good with Euphoria yet. I'm asking what I need to do to make this happen.
4. Re: Keyboarding Assistance
- Posted by cklester <cklester at yahoo.com> Feb 08, 2006
- 465 views
- Last edited Feb 09, 2006
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard Get Michael Bolin's "Keyboard Interrupt Handler." -=ck "Programming in a state of Euphoria." http://www.cklester.com/euphoria/
5. Re: Keyboarding Assistance
- Posted by Funkbrat <funkbrat1 at yahoo.com> Feb 08, 2006
- 466 views
- Last edited Feb 09, 2006
cklester wrote: > > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard</a> > > Get Michael Bolin's "Keyboard Interrupt Handler." > > -=ck > "Programming in a state of Euphoria." > <a > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> I already tried that, but I don't know how it works or how to use it.
6. Re: Keyboarding Assistance
- Posted by cklester <cklester at yahoo.com> Feb 08, 2006
- 471 views
- Last edited Feb 09, 2006
Funkbrat wrote: > > cklester wrote: > > > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard</a> > > > > Get Michael Bolin's "Keyboard Interrupt Handler." > > > > -=ck > > "Programming in a state of Euphoria." > > <a > > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > > I already tried that, but I don't know how it works or how to use it. Then go here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=paddle+ball and get Ralf Nieuwenhuijsen's "Paddle & Ball Game." He uses Michael's code and you should be able to learn about it from there. -=ck "Programming in a state of Euphoria." http://www.cklester.com/euphoria/
7. Re: Keyboarding Assistance
- Posted by Bernie Ryan <xotron at bluefrog.com> Feb 08, 2006
- 475 views
- Last edited Feb 09, 2006
Funkbrat wrote: > > cklester wrote: > > > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard</a> > > > > Get Michael Bolin's "Keyboard Interrupt Handler." > > > > -=ck > > "Programming in a state of Euphoria." > > <a > > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > > I already tried that, but I don't know how it works or how to use it. Why don't you go to the archive and see how other user's are scrolling, here's the location of some scrollers. http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scrolling Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.exw Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
8. Re: Keyboarding Assistance
- Posted by don cole <doncole at pacbell.net> Feb 09, 2006
- 464 views
Funkbrat wrote: > > don cole wrote: > > > > Funkbrat wrote: > > > > > > I need to know how to do proper keyboarding in DOS Euphoria. > > > > > > I want the keyboard to recognize a pressed key without a pause. Normally, > > > it detects the key once, waits a short while, then continues to recognize > > > the > > > key again. I don't want that to happen. I want it to constantly receive > > > the > > > keypress at a smooth rate without a pause after the first time. How do I > > > do > > > it? > > > > Could we see a sample of your code that pauses. > > > > Don Cole > > I don't really have any code. Those were the wait_key() and get_key() > commands I were talking about. What I want is to program my own keyboarding > routines that repeatedly recognize a key from the keyboard without a pause, > like for moving a player in a game, like a side-scroller or something. I > just don't know how to do it. I'm not that good with Euphoria yet. I'm > asking what I need to do to make this happen. Hello Funkbrat, I might be missing something here, but I don't understand how you can determine that there is a pause after your keyboard recognizizes a key, if you have no code to execute. Again I would like to see the code that is causing this pause. Don Cole A Bug is an un-documented feature. A Feature is a documented Bug.
9. Re: Keyboarding Assistance
- Posted by Funkbrat <funkbrat1 at yahoo.com> Feb 09, 2006
- 466 views
- Last edited Feb 10, 2006
Bernie Ryan wrote: > > Funkbrat wrote: > > > > cklester wrote: > > > > > > <a > > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard</a> > > > > > > Get Michael Bolin's "Keyboard Interrupt Handler." > > > > > > -=ck > > > "Programming in a state of Euphoria." > > > <a > > > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > > > > I already tried that, but I don't know how it works or how to use it. > > Why don't you go to the archive and see how other user's are > scrolling, here's the location of some scrollers. > > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scrolling">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scrolling</a> > > Bernie > > My files in archive: > w32engin.ew mixedlib.e eu_engin.e win32eru.exw > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> I don't need help with scrolling, I need help with keyboarding. As for you don cole, I told you I don't have code. It's the wait_key() and get_key() that give a pause before recognizing the key again. I'm asking how to make my own keyboarding routines, not for help on correcting code. But just forget it you guys. I'm going to try to figure out how to use Michael Bolin's Keyboard Interrupt Handler. Thanks for trying to help me out, though.
10. Re: Keyboarding Assistance
- Posted by Bernie Ryan <xotron at bluefrog.com> Feb 09, 2006
- 468 views
- Last edited Feb 10, 2006
Funkbrat wrote: > I don't need help with scrolling, I need help with keyboarding. > > As for you don cole, I told you I don't have code. It's the wait_key() and > get_key() that give a pause before recognizing the key again. I'm asking > how to make my own keyboarding routines, not for help on correcting code. > > But just forget it you guys. I'm going to try to figure out how to use > Michael Bolin's Keyboard Interrupt Handler. Thanks for trying to help me > out, though. If you download this program like I explained to you you will find a keyboard routine that is writen in Euphoria assembler and would be the fastest. http://www.rapideuphoria.com/contribz.zip Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.exw Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
11. Re: Keyboarding Assistance
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 10, 2006
- 469 views
Funkbrat wrote: > > Bernie Ryan wrote: > > > > Funkbrat wrote: > > > > > > cklester wrote: > > > > > > > > <a > > > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&keywords=keyboard</a> > > > > > > > > Get Michael Bolin's "Keyboard Interrupt Handler." > > > > > > > > -=ck > > > > "Programming in a state of Euphoria." > > > > <a > > > > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > > > > > > I already tried that, but I don't know how it works or how to use it. > > > > Why don't you go to the archive and see how other user's are > > scrolling, here's the location of some scrollers. > > > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scrolling">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scrolling</a> > > > > Bernie > > > > My files in archive: > > w32engin.ew mixedlib.e eu_engin.e win32eru.exw > > > > Can be downloaded here: > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> > > I don't need help with scrolling, I need help with keyboarding. > > As for you don cole, I told you I don't have code. It's the wait_key() and > get_key() that give a pause before recognizing the key again. I'm asking > how to make my own keyboarding routines, not for help on correcting code. > > But just forget it you guys. I'm going to try to figure out how to use > Michael Bolin's Keyboard Interrupt Handler. Thanks for trying to help me > out, though. I'm not sure exactly what you want, but in DOS there's a command: MODE CON[RATE=(number)][DELAY=(number)] It lets you control the repeat rate on the keyboard, and the initial delay before keys start repeating. I don't know if it works on all versions of DOS. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
12. Re: Keyboarding Assistance
- Posted by Jason Gade <jaygade at yahoo.com> Feb 10, 2006
- 458 views
don cole wrote: > > Funkbrat wrote: > > > > don cole wrote: > > > > > > Funkbrat wrote: > > > > > > > > I need to know how to do proper keyboarding in DOS Euphoria. > > > > > > > > I want the keyboard to recognize a pressed key without a pause. > > > > Normally, > > > > it detects the key once, waits a short while, then continues to > > > > recognize the > > > > key again. I don't want that to happen. I want it to constantly > > > > receive the > > > > keypress at a smooth rate without a pause after the first time. How do > > > > I do > > > > it? > > > > > > Could we see a sample of your code that pauses. > > > > > > Don Cole > > > > I don't really have any code. Those were the wait_key() and get_key() > > commands I were talking about. What I want is to program my own keyboarding > > routines that repeatedly recognize a key from the keyboard without a pause, > > like for moving a player in a game, like a side-scroller or something. I > > just don't know how to do it. I'm not that good with Euphoria yet. I'm > > asking what I need to do to make this happen. > > > Hello Funkbrat, > > I might be missing something here, but I don't understand how you can > determine that there is a pause after your keyboard recognizizes a key, > if you have no code to execute. > > Again I would like to see the code that is causing this pause. > > Don Cole Once I realized what he was talking about, I made a quick test.
integer key atom timer timer = time() key = get_key() while key != 27 do -- esc key = get_key() if key != -1 then if key > 32 and key < 127 then ? {key, time() - timer} end if timer = time() end if end while
It's probably related to how DOS/Windows handles key-repeat. After pressing a key, I get about a .5s pause before the key starts repeating at about .03 seconds between. Otherwise I don't know how to help him. Funkbrat: are you writing for DOS or Windows? -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel j.
13. Re: Keyboarding Assistance
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 10, 2006
- 468 views
Robert Craig wrote: > I'm not sure exactly what you want ... The documentation for get_key() says it doesn't wait for the user and returns -1 if there is no key in the buffer. However, this doesn't seem to be the case (Windows XP SP2). It blocks, waiting for keyboard input. So the original poster might wondering why there is a 'pause' instead of just returning -1? -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
14. Re: Keyboarding Assistance
- Posted by Jason Gade <jaygade at yahoo.com> Feb 10, 2006
- 488 views
Derek Parnell wrote: > > Robert Craig wrote: > > > I'm not sure exactly what you want ... > > The documentation for get_key() says it doesn't wait for the user and returns > -1 if there is no key in the buffer. However, this doesn't seem to be the case > (Windows XP SP2). It blocks, waiting for keyboard input. So the original > poster > might wondering why there is a 'pause' instead of just returning -1? That wasn't the case for my simple test programs. Except for a delay before the key started repeating (which is what I think the original poster was talking about) the routine returned immediately. (Windows XP Pro SP2, exwc.) -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel j.
15. Re: Keyboarding Assistance
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 10, 2006
- 461 views
Jason Gade wrote: > That wasn't the case for my simple test programs. Except for a delay before > the key started repeating (which is what I think the original poster was > talking > about) the routine returned immediately. (Windows XP Pro SP2, exwc.) Okay. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
16. Re: Keyboarding Assistance
- Posted by Jason Gade <jaygade at yahoo.com> Feb 10, 2006
- 468 views
Derek Parnell wrote: > > Jason Gade wrote: > > > That wasn't the case for my simple test programs. Except for a delay before > > the key started repeating (which is what I think the original poster was > > talking > > about) the routine returned immediately. (Windows XP Pro SP2, exwc.) > > Okay. > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Sorry. Maybe I should repeat English. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel j.