|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Using the keyboard
I was just wondering if you could use the left half of the keyboard (1, 2, 3, 4, 5, 6, q, w, e, r, t, a, s, d, f, g, z, x, c, v, b, [shift], [ctrl], and arrow keys (yes I know they're not on the left side)) to interface with the robot. I'm not trying to use a text input box or anything; just press the key and have something happen. I've been looking through the SmartDashboard Class Reference, specifically
Code:
static bool GetBoolean (std::string keyName) |
|
#2
|
||||
|
||||
|
Re: Using the keyboard
You would need to create a custom widget to do this. Definitely possible though, you just need to get ahold of the parent window, and listen to key events there. Or do what the driver station does, and listen to key events globally... though not sure if you can do that from Java.
|
|
#3
|
||||
|
||||
|
Re: Using the keyboard
How about C++? I had a feeling it wouldn't be easy.... Does that mean that in order to do It I would have to learn how to modify/create a SmartDashboard and learn Network tables? Is there some way to modify a commercially available USB or PS/2 half-keyboard to function as a joystick (so I could just use GetRawButton(x)? Or am I over thinking this?
|
|
#4
|
|||
|
|||
|
Re: Using the keyboard
Use PPJoy to create a virtual joystick, then use GlovePIE to redirect keys to joystick buttons. We used this in the past to access the DPad on a joystick
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|