Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyboardController ¶
type KeyboardController struct {
// contains filtered or unexported fields
}
KeyboardController represents a keyboard input controller for the emulator
func NewKeyboardController ¶
func NewKeyboardController(controller nes.InputController) *KeyboardController
NewKeyboardController creates a new keyboard input controller
func (*KeyboardController) GetKeyMapping ¶
func (k *KeyboardController) GetKeyMapping() []glfw.Key
GetKeyMapping returns the list of keys in the mapping
func (*KeyboardController) HandleKey ¶
func (k *KeyboardController) HandleKey(key glfw.Key) bool
HandleKey handles the key input and returns true if it was sucessful, false if the key was not mapped
func (*KeyboardController) Reset ¶
func (k *KeyboardController) Reset()
Reset calls the reset method for the controller to start a read
func (*KeyboardController) SetMapping ¶
func (k *KeyboardController) SetMapping(mappings map[glfw.Key]nes.Button)
SetMapping sets the key mapping
func (*KeyboardController) WithDefaultMapping ¶
func (k *KeyboardController) WithDefaultMapping() *KeyboardController
WithDefaultMapping creates a new keyboard controller with the default mapping W-A-S-D for keypad, N,M for A and B, Enter and Backspace for Start and Select
Click to show internal directories.
Click to hide internal directories.