NewKeyManager creates a new KeyManager.
()
| 17 | |
| 18 | // NewKeyManager creates a new KeyManager. |
| 19 | func NewKeyManager() *KeyManager { |
| 20 | return &KeyManager{ |
| 21 | dirtmap: make(map[Key]Key), |
| 22 | mapper: make(map[Key]KeyState), |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // KeyManager tracks which keys are pressed and released at the current point of time. |
| 27 | type KeyManager struct { |
no outgoing calls