Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 17:43 26 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: key interrupts

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 07:29pm 12 Nov 2022
Copy link to clipboard 
Print this post

Hi folks,

I don't suppose I've missed some trick on the CMM2 to get an interrupt for a special key (e.g. shift or ctrl) ? The best I can come up with is a fast tick interrupt combined with KEYDOWN(). ON KEY doesn't do the trick because that seems to be triggered only by characters being added to the serial buffer.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
frnno967
Senior Member

Joined: 02/10/2020
Location: United States
Posts: 104
Posted: 05:35am 01 Dec 2022
Copy link to clipboard 
Print this post

I am interested in the answer to this question too. For no practical reason other than learning more about how KEYDOWN and ON KEY work at a deeper level.
Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 08:26am 01 Dec 2022
Copy link to clipboard 
Print this post

  Quote  The best I can come up with is a fast tick interrupt combined with KEYDOWN(). ON KEY doesn't do the trick because that seems to be triggered only by characters being added to the serial buffer.

Correct. The modifier keys don't have an ascii character either real or pretend (function keys) so there is no other way of doing it than to poll
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 04:03pm 01 Dec 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  The best I can come up with is a fast tick interrupt combined with KEYDOWN(). ON KEY doesn't do the trick because that seems to be triggered only by characters being added to the serial buffer.

Correct. The modifier keys don't have an ascii character either real or pretend (function keys) so there is no other way of doing it than to poll


Thanks Peter. So far I've found the method that I've described to be adequate for my controller library use case.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024