Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable autorepeat for one key (Read 1979 times)
MisteryGuy_07
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Jan 21st, 2019
Disable autorepeat for one key
Mar 21st, 2019 at 10:17pm
Print Post  
It is possible to disable the autorepeat behaviour for one key? I seem to be getting an error where having auto repeat turned on while debugging triggers twice the key press.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Disable autorepeat for one key
Reply #1 - Mar 22nd, 2019 at 2:13pm
Print Post  
The AutoRepeat timer starts after KeyPressed event fires, so you could toggle AutoRepeat state from the KeyPressed handler:

Code
Select All
void vk_KeyPressed(object sender, VirtualKeyEventArgs e)
{
    var rk = e.Key as RegularKey;
    if (rk != null && rk.UpperCase == "A")
        vk.AutoRepeat = true;
    else
        vk.AutoRepeat = false;
} 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint