From 061614080adae236d017f59bd24dd3dc63dceac1 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 19 Dec 2021 23:58:55 +0900 Subject: [PATCH] ebiten: fix comments --- input.go | 8 +++++--- keys.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/input.go b/input.go index 2ba772758..f7d94e5c7 100644 --- a/input.go +++ b/input.go @@ -24,7 +24,9 @@ import ( // Giving a slice that already has enough capacity works efficiently. // // AppendInputChars represents the environment's locale-dependent translation of keyboard -// input to Unicode characters. +// input to Unicode characters. On the other hand, Key represents a physical key of US keyboard layout +// +// "Control" and modifier keys should be handled with IsKeyPressed. // // AppendInputChars is concurrent-safe. // @@ -47,8 +49,8 @@ func InputChars() []rune { // If you want to know whether the key started being pressed in the current frame, // use inpututil.IsKeyJustPressed // -// IsKeyPressed is based on a mapping of device (US keyboard) codes to input device keys. -// "Control" and modifier keys should be handled with IsKeyPressed. +// Note that a Key represents a pysical key of US keyboard layout. +// For example, KeyQ represents Q key on US keyboards and ' (quote) key on Dvorak keyboards. // // Known issue: On Edge browser, some keys don't work well: // diff --git a/keys.go b/keys.go index aca29bc0f..5d5e5e952 100644 --- a/keys.go +++ b/keys.go @@ -23,7 +23,7 @@ import ( ) // A Key represents a keyboard key. -// These keys represent pysical keys of US keyboard. +// These keys represent pysical keys of US keyboard layout. // For example, KeyQ represents Q key on US keyboards and ' (quote) key on Dvorak keyboards. type Key int