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 Henrik Heimbuerger)

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 Henrik Heimbuerger

Milestone: MS1: First usable version

comment:2 Changed 16 years ago by Henrik Heimbuerger

Description: modified (diff)
Priority: minormajor
Type: enhancementfeature

comment:3 Changed 16 years ago by Henrik Heimbuerger

Component: unspecifiedcontroller

comment:4 Changed 16 years ago by Henrik Heimbuerger

Remember to persist the configured keyboard layouts (using #50) and to replace the KeyboardDevice instantiations in the InputDeviceManager constructor as well.

comment:5 Changed 16 years ago by Henrik Heimbuerger

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 SVN

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 SVN

New commit by frohn (revision [263]):
[Partial fix for ticket #13] Trigger only enabled, when Trigger-Button is held (Carrera-like)

In the version before the trigger was activated by pressing the Trigger-Button and deactivated by a second hit.

Now it bahaves like a slot car controller.

comment:8 Changed 16 years ago by SVN

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 Henrik Heimbuerger

Owner: changed from nobody to Fabian Rohn
Status: newassigned

comment:10 Changed 16 years ago by SVN

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 Henrik Heimbuerger

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 SVN

New commit by hheimbuerger (revision [277]):
[Partial fix for ticket #13] Trigger state now longer inverts when the focus is lost at an unfortunate time.

The trigger still sticks however, when focus is lost while it is held.

comment:13 Changed 16 years ago by Henrik Heimbuerger

To do:

  • fix the bugs mentioned above
  • make the layout configurable in the InputDeviceSettingsDialog

comment:14 Changed 16 years ago by Fabian Rohn

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.