EASy68K  
It is currently Sat Mar 25, 2017 5:45 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: 'Sticking' keys
PostPosted: Mon Sep 13, 2010 2:29 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
If you use task 19 to check for a keypress and then open a file dialog and then release the key - as you would because the dialog is now open - and now select a file and hit open the key you detected is now 'stuck' until after you press and release it again.

If you hit cancel the key seems to 'stick' in the not pressed condition until after being pressed and released again.

The code I'm using to detect when a key detected in this way has just been pressed has always worked before.

Example code here.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 13, 2010 3:01 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Bother! That last was me leaving too many lines of the original code in place.

The key seems to 'stick' only in the pressed condition.

The archive has been replaced by the corrected version.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 13, 2010 3:39 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1035
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Try version sim68K v5.7.4

The file dialog captures key presses before they get to the IO form so it never detects key up. v5.7.4 clears the key up/down array when a file dialog is displayed. This corrects the sticky key problem but might cause other key detection issues.

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 13, 2010 6:54 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Yes, that's fixed that little glitch.

Quote:
but might cause other key detection issues.

I think a spurious key up will be easier to live with than missing a real key up.

Lee.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group