18 October 2022, 14:40 | #1 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
OS Turn off keyboard input?
Hi all,
In my game I bring the system back up so that I can load files using the OS, however if during that time someone happens to hit the keyboard - then loading stops until return is pressed. Is it possible to stop keyboard input? Can someone give me some pointers as I'm not that hot with the OS side of things. thanks, Graeme |
18 October 2022, 14:51 | #2 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,064
|
Install a handler for input.device with high enough priority (above intuition I guess, which is at 50) that will consume rawkey events (set class to NULL)?
|
18 October 2022, 17:30 | #3 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
This can help:
http://eab.abime.net/showpost.php?p=...3&postcount=26 |
18 October 2022, 18:06 | #4 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,313
|
Frankly, this looks more to me as if you should check why it stops loading rather than looking for a workaround. There is nothing keyboard specific in the IO subsystem.
|
18 October 2022, 18:10 | #5 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
If some text gets printed to the console, pressing a key will stop everything.
|
18 October 2022, 18:12 | #6 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,313
|
Actually, it will not "stop everything", it will halt the printing process until the console becomes available, but then the solution should rather be "do not print anything on the console" rather than "try questionable workaround".
|
18 October 2022, 18:25 | #7 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Of course it won't stop the whole system, it's not what i meant !
But anyway, if keypresses are transmitted to a background console, then the program has better not let them get there. Commands may be run inadvertently, and even if not, it's not very clean to have a cli with garbage in. |
18 October 2022, 18:33 | #8 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,215
|
Quote:
|
|
18 October 2022, 19:01 | #9 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,064
|
This looks like it's only needed in debug/development version, e.g. you are printing out filenames of stuff you're loading.
And there is also: if (intuibase->ib_ActiveWindow != my_window) do nothing to make it less drastic, if it's applicable (that's what my input handlers typically do, but they are all part of 100% os friendly apps so...). |
18 October 2022, 20:15 | #10 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,215
|
Quote:
|
|
18 October 2022, 20:44 | #11 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
|
|
18 October 2022, 21:03 | #12 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,064
|
Yeah, I don't like mixing it unless it's something relatively simple. Why? To keep it short, A500 + extreme min-maxing + I code because I can/want, not because I need = how it is :P.
|
19 October 2022, 09:23 | #13 |
Registered User
Join Date: Jan 2005
Location: UmeƄ
Age: 43
Posts: 935
|
If the screen is opened through the system and made active, the input events should not fall through to the shell where it was launched.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NComm not accepting keyboard input | Jaymes Keller | support.Apps | 8 | 01 July 2017 04:02 |
Adjusting Keyboard input? | Sinphaltimus | support.WinUAE | 5 | 17 June 2017 11:10 |
Keyboard input lag with other programs | mark_k | support.WinUAE | 2 | 15 October 2016 21:43 |
no keyboard input in JR-Comm | boosey | New to Emulation or Amiga scene | 3 | 16 September 2006 18:14 |
It all works, but there's no keyboard input | frennen | New to Emulation or Amiga scene | 3 | 01 November 2002 12:47 |
|
|