English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 18 October 2022, 14:40   #1
mcgeezer
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
mcgeezer is offline  
Old 18 October 2022, 14:51   #2
a/b
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)?
a/b is offline  
Old 18 October 2022, 17:30   #3
ross
Defendit numerus
 
ross's Avatar
 
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
ross is offline  
Old 18 October 2022, 18:06   #4
Thomas Richter
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.
Thomas Richter is offline  
Old 18 October 2022, 18:10   #5
meynaf
son of 68k
 
meynaf's Avatar
 
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.
meynaf is offline  
Old 18 October 2022, 18:12   #6
Thomas Richter
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".
Thomas Richter is offline  
Old 18 October 2022, 18:25   #7
meynaf
son of 68k
 
meynaf's Avatar
 
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.
meynaf is offline  
Old 18 October 2022, 18:33   #8
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,215
Quote:
Originally Posted by ross View Post
I'll give my recommendations though I've mostly tested it with KS3 . (Also seems to works fine with naughty stuff like peeking at ciaa->ciasdr to check for a key press, but don't rely on it)
paraj is offline  
Old 18 October 2022, 19:01   #9
a/b
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...).
a/b is offline  
Old 18 October 2022, 20:15   #10
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,215
Quote:
Originally Posted by a/b View Post
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...).
So you either kill the system or stay fully friendly? (not bait, just curious what you mean)
paraj is offline  
Old 18 October 2022, 20:44   #11
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by ross View Post
As usual, this has worked perfectly well for my needs.
mcgeezer is offline  
Old 18 October 2022, 21:03   #12
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,064
Quote:
Originally Posted by paraj View Post
So you either kill the system or stay fully friendly? (not bait, just curious what you mean)
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.
a/b is offline  
Old 19 October 2022, 09:23   #13
patrik
Registered User
 
patrik's Avatar
 
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.
patrik is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:41.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12302 seconds with 13 queries