New topic: 

Trap Cntrl & other keys

<http://forums.realsoftware.com/viewtopic.php?t=39816>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        tseyfarth          Post subject: Trap Cntrl & other keysPosted: 
Tue Jul 12, 2011 8:55 pm                         
Joined: Sat Dec 04, 2010 9:14 pm
Posts: 302                Hello all,

Does anyone know how to trap the Cntrl (and other keys) and also to disable 
their use?

Thank you
Tim   
                             Top                 Specialised          Post 
subject: Re: Trap Cntrl & other keysPosted: Wed Jul 13, 2011 1:01 am            
                     
Joined: Thu Aug 26, 2010 6:57 am
Posts: 306
Location: Sydney Australia                Add a timer to an appropriate 
position (main window for example).
Set its mode to multiple and its period fairly low (I use 50) - if its high you 
have to be pressing the keys for that period of time for the event to fire.

In the action event of the timer add
Code:  
if keyboard.AsyncKeyDown(06) and keyboard.AsyncKeyDown(126) then
  // do something here
  end if


In this example when pressing "z" and the up arrow the if statement is true and 
the code (//do something here) is executed.      
_________________
Regards

Chris Musty
Specialised Technologies Pty Ltd

Software | Electronics | IT | Multimedia

http://www.specialised.net.au
-----------------------------------------------
RB 2011r1 Enterprise on Win7 Ultimate, Ubuntu 10.10 on Virtualbox  
                             Top                 tseyfarth          Post 
subject: Re: Trap Cntrl & other keysPosted: Wed Jul 13, 2011 1:05 am            
             
Joined: Sat Dec 04, 2010 9:14 pm
Posts: 302                Ok thank you!

Is there a way also to NOT allow a combination to work?  The main reason for 
the question is to stop a multi selection being made in a WebListBox.

Tim   
                             Top                 Specialised          Post 
subject: Re: Trap Cntrl & other keysPosted: Wed Jul 13, 2011 1:07 am            
                     
Joined: Thu Aug 26, 2010 6:57 am
Posts: 306
Location: Sydney Australia                If its not defined it cannot happen!

Also

This will help you with the KeyCodes - 
http://docs.realsoftware.com/index.php/Keyboard      
_________________
Regards

Chris Musty
Specialised Technologies Pty Ltd

Software | Electronics | IT | Multimedia

http://www.specialised.net.au
-----------------------------------------------
RB 2011r1 Enterprise on Win7 Ultimate, Ubuntu 10.10 on Virtualbox  
                             Top                 Specialised          Post 
subject: Re: Trap Cntrl & other keysPosted: Wed Jul 13, 2011 1:09 am            
                     
Joined: Thu Aug 26, 2010 6:57 am
Posts: 306
Location: Sydney Australia                Just read your question properly - 
isn't there a multiselect property that you can set to false?      
_________________
Regards

Chris Musty
Specialised Technologies Pty Ltd

Software | Electronics | IT | Multimedia

http://www.specialised.net.au
-----------------------------------------------
RB 2011r1 Enterprise on Win7 Ultimate, Ubuntu 10.10 on Virtualbox  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to