![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Registered User
Join Date: Feb 2010
Location: Helsinki, Finland
Posts: 31
|
Keyboard buffer problem
I've done a program in ASM and it works fine. I can detect keys and qualifier keys by using a routine in lowlevel.library (so the background I/O system interrupt is running). BUT when I exit my program back to DOS some of the keys I had pressed get written to the DOS window. I suppose they come out of the keyboard buffer or maybe some system structure in memory that holds this stuff. I don't want this to happen. It looks like this in DOS...
1> myprogram asdqwreytqrwyratsrdtrastrdtsrtrqywetrwterwtetwettqerwetqrwe 1> I've tried to communicate with the keyboard.device and send a CMD_CLEAR for it and judging from the error codes this succeeded BUT it didn't fix the problem. I haven't much played with devices (or libraries) before so what should I do??? There's probably something very basic that I have missed. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar 2008
Location: Las Vegas/Nevada
Posts: 104
|
I know Piru's startup.asm creates an input handler to swallow input so it doesn't drop through to the cli.
A link to it here: http://www.sintonen.fi/src/hwstartup/hwstartup.asm I picked up a lot going over that and trying to work out exactly what it does and how it goes about it. |
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2010
Location: Helsinki, Finland
Posts: 31
|
Thank you. It has good stuff in it. Also WB support and disabling requesters. Just what I needed. Case closed
![]() |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Feb 2010
Location: Helsinki, Finland
Posts: 31
|
Got it done. Solution was - add an input handler for the input device that tags events as NULL. The details I don't understand much but it works.
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Feb 2010
Location: Helsinki, Finland
Posts: 31
|
Piru's solution has the disadvantage that it eats all the keys, so you can't close requesters for example. I kind of want it to prevent the echoing of characters on CLI only and not to prevent keystokes.
I found a new very simple solution. I open a small RAW window as first thing in my code. Then close it as last thing in my code. This window will eat all the keys but I will still be able to close requesters in error situations. It was super simple just call Open in exec library and have the filename as 'RAW:50/25/200/50/My Program',0. |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 60
Posts: 335
|
Quote:
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Having problem with keyboard and winUAE | Dakumaru | support.WinUAE | 2 | 19 November 2007 18:58 |
| Problem with my keyboard ! | Mazout | support.WinFellow | 5 | 20 August 2004 05:49 |
| Keyboard problem | AndyDE | support.WinUAE | 9 | 25 June 2004 12:25 |
| A1200 Keyboard problem | Peanutuk | support.Hardware | 8 | 26 January 2004 09:46 |
| Keyboard problem | nethermancer | support.WinUAE | 0 | 29 September 2002 20:11 |