ebiten: fix comments

This commit is contained in:
Hajime Hoshi 2021-12-19 23:58:55 +09:00
parent 897ecdd5e6
commit 061614080a
2 changed files with 6 additions and 4 deletions

View File

@ -24,7 +24,9 @@ import (
// Giving a slice that already has enough capacity works efficiently. // Giving a slice that already has enough capacity works efficiently.
// //
// AppendInputChars represents the environment's locale-dependent translation of keyboard // 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. // 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, // If you want to know whether the key started being pressed in the current frame,
// use inpututil.IsKeyJustPressed // use inpututil.IsKeyJustPressed
// //
// IsKeyPressed is based on a mapping of device (US keyboard) codes to input device keys. // Note that a Key represents a pysical key of US keyboard layout.
// "Control" and modifier keys should be handled with IsKeyPressed. // 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: // Known issue: On Edge browser, some keys don't work well:
// //

View File

@ -23,7 +23,7 @@ import (
) )
// A Key represents a keyboard key. // 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. // For example, KeyQ represents Q key on US keyboards and ' (quote) key on Dvorak keyboards.
type Key int type Key int