Opened 16 years ago
Closed 16 years ago
#13 closed feature (fixed)
Implement keyboard support
Reported by: | Henrik Heimbuerger | Owned by: | Fabian Rohn |
---|---|---|---|
Priority: | major | Milestone: | MS1: First release (1.0.0) |
Component: | controller | Version: | pre-1.0 |
Keywords: | keyboard, input device | Cc: |
Description (last modified by )
Implement keyboard support.
First research if it is possible to have a global (inside JaCaVi) hook for keyboard events. If so, it has to be only active when the race perspective is active.
Otherwise, add the keyboard support as a normal keyboard listener to the mouse input view (which shouldn't be called MouseInputView then!).
Avoid creating new commands/actions for the keyboard support, as that isn't very clean and makes it hard to make the keys used user-configurable.
Change History (14)
comment:1 Changed 16 years ago by
Milestone: | → MS1: First usable version |
---|
comment:2 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Priority: | minor → major |
Type: | enhancement → feature |
comment:3 Changed 16 years ago by
Component: | unspecified → controller |
---|
comment:4 Changed 16 years ago by
comment:5 Changed 16 years ago by
Owner: | changed from somebody to nobody |
---|
Batch reassigned all tickets owned by the virtual user 'somebody' to the virtual user 'nobody'.
comment:6 Changed 16 years ago by
New commit by frohn (revision [262]):
[Partial fix for ticket #13] Added an initial KeyboardDevice? Conroller
The KeyboardDevice? works with a global listener which is added to the the Display. For a clean solution the listener has to be added when the race starts and removed, when the race end up.(cleanup method)
To make it configurable I also added a KeyboardLayout? class, where the keys could be bind to an action. This layout may be added to the KeyboardDevice? constructor.
(The current version has a static KeyboardLayout?.Default member)
comment:7 Changed 16 years ago by
comment:8 Changed 16 years ago by
New commit by frohn (revision [265]):
[Partial fix for ticket #12 and #13] Listener Problem resolved
I added two abstract methods to DeviceController?, which has been essential for Keyboard and Mouse Device:
- hookListener() --> adds the global listener when the race starts
- unhookListener() --> removes ... when race finishes
These methods are called by RaceEngine?.
comment:9 Changed 16 years ago by
Owner: | changed from nobody to Fabian Rohn |
---|---|
Status: | new → assigned |
comment:10 Changed 16 years ago by
New commit by hheimbuerger (revision [267]):
[Partial fix for tickets #12 and #13] A preview for mouse and keyboard layouts has been added to the InputDeviceSettingsDialog.
The implementation is rather hackish and probably still contains some bugs. Cleanup and refactoring wouldn't hurt.
Additionally, a bug in the mouse device has been fixed that caused it to 'stick' when unhookListener() was invoked while the mouse button was pressed.
Also, the device states of both mouse and keyboard are now reset on hookListener() and some warnings have been fixed.
comment:11 Changed 16 years ago by
If that is possible, the trigger should be released when JaCaVi loses focus.
Right now, the trigger sticks if Ctrl is held while switching to another window.
comment:12 Changed 16 years ago by
comment:13 Changed 16 years ago by
To do:
- fix the bugs mentioned above
- make the layout configurable in the InputDeviceSettingsDialog
comment:14 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Remember to persist the configured keyboard layouts (using #50) and to replace the KeyboardDevice instantiations in the InputDeviceManager constructor as well.