Page 1 of 1
		
			
				Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 8:19amby Jay
				Ok, I have a question.  In EVC++ how do I make it so that it does something when I press the rocker up(0x26) on my Jornada?
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 8:25amby Jaybot
				Um, could you make that a bit clearer?  What is the something that you want to do with the key 0x26?
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 8:48amby Jay
				I'm just going to have it change some variables when it is pressed.
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 9:22amby Moose or Chuck
				The rocker is the up and down key. It's identical to that and can not be coded seperate from it. So the Up and Down key on the D-Pad are duplicated by the rocker.
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 9:24amby Moose or Chuck
				Oh, did you want the code? Here's a case that should do it:<br><br>               case WM_KEYDOWN:<br>                     vkKey = (short)wParam;<br>                     if (vkKey == g_gxkl.vkUp) {<br>                           //stuff<br>                           break;<br>                     }<br>                     <br>                     if (vkKey == g_gxkl.vkDown) {<br>                           //stuff<br>                           break;<br>                     }<br>                     <br>               case WM_KEYUP:<br>                     vkKey = (short)wParam;<br>                     if (vkKey == g_gxkl.vkUp) {<br>                           //stuff<br>                           break;<br>                     }<br>                     <br>                     if (vkKey == g_gxkl.vkDown) {<br>                           //stuff<br>                           break;<br>                     }<br><br>//WM_KEYUP detects when a key is released.<br>//WM_KEYDOWN detects when a key is pressed.
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 9:25amby Moose or Chuck
				Doh, I always forget the includes and defines:<br><br>#include "gx.h"<br>GXKeyList g_gxkl;              // GX struct<br><br>#define WM_KEYDOWN                      0x28<br>#define WM_KEYUP                        0x26
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 3, 2001 @ 1:05pmby Jaybot
				thats why he's asking moose, the jornadas have no d-pad.
			 
			
		
			
				Re: Catching a key in EVC++
				
Posted: 
Apr 4, 2001 @ 2:36amby Moose or Chuck
				Well, as I said The rocker is only the up and down key, on all devices. So just use the up and down key tests I provided.