robotgo/docs/keys.md

144 lines
3.1 KiB
Markdown
Raw Permalink Normal View History

## Type Conversion
| | type conversion | func |
| --- | --------------------------------- | ----------------------- |
| \* | robotgo.Bitmap -> robotgo.CBitmap | robotgo.ToCBitmap() |
| | robotgo.Bitmap -> \*image.RGBA | robotgo.ToRGBAGo() |
| \* | robotgo.CBitmap -> C.MMBitmapRef | robotgo.ToMMBitmapRef() |
| | robotgo.CBitmap -> robotgo.Bitmap | robotgo.ToBitmap() |
| | robotgo.CBitmap -> image.Image | robotgo.ToImage() |
| | robotgo.CBitmap -> \*image.RGBA | robotgo.ToRGBA() |
| \* | C.MMBitmapRef -> robotgo.CBitmap | robotgo.CBitmap() |
| \* | image.Image -> robotgo.Bitmap | robotgo.ImgToBitmap() |
| | image.Image -> robotgo.CBitmap | robotgo.ImgToCBitmap() |
| | image.Image -> []byte | robotgo.ToByteImg() |
| | image.Image -> string | robotgo.ToStringImg() |
| \* | \*image.RGBA -> robotgo.Bitmap | robotgo.RGBAToBitmap() |
| \* | []byte -> image.Image | robotgo.ByteToImg() |
| | []byte-> robotgo.CBitmap | robotgo.ByteToCBitmap() |
| | []byte -> string | string() |
| \* | string -> image.Image | robotgo.StrToImg() |
| | string -> byte | []byte() |
2017-02-24 18:42:29 +00:00
# Keys
2017-02-24 12:33:58 +00:00
2017-03-10 15:07:41 +00:00
```Go
2018-12-12 17:59:19 +00:00
"A-Z a-z 0-9"
2017-03-15 08:50:45 +00:00
"backspace"
2019-01-09 00:11:01 +00:00
"delete"
"enter"
2017-02-24 12:33:58 +00:00
"tab"
"esc"
2017-02-24 12:33:58 +00:00
"escape"
2019-01-09 00:11:01 +00:00
"up" Up arrow key
2017-03-02 13:50:44 +00:00
"down" Down arrow key
"right" Right arrow key
"left" Left arrow key
2017-02-24 12:33:58 +00:00
"home"
"end"
"pageup"
"pagedown"
2018-12-12 17:59:19 +00:00
2017-02-24 12:33:58 +00:00
"f1"
"f2"
"f3"
"f4"
"f5"
"f6"
"f7"
"f8"
"f9"
"f10"
"f11"
"f12"
"f13"
"f14"
"f15"
"f16"
"f17"
"f18"
"f19"
"f20"
"f21"
"f22"
"f23"
"f24"
2018-12-12 17:59:19 +00:00
2019-01-02 13:48:23 +00:00
"cmd" is the "win" key for windows
"lcmd" left command
"rcmd" right command
2021-12-24 17:50:06 +00:00
// "command"
2017-02-24 12:33:58 +00:00
"alt"
2019-01-02 13:48:23 +00:00
"lalt" left alt
"ralt" right alt
2018-12-11 15:57:08 +00:00
"ctrl"
2019-01-02 13:48:23 +00:00
"lctrl" left ctrl
"rctrl" right ctrl
2017-02-24 12:33:58 +00:00
"control"
"shift"
2019-01-02 13:48:23 +00:00
"lshift" left shift
"rshift" right shift
2021-12-24 17:50:06 +00:00
// "right_shift"
2018-12-16 17:51:14 +00:00
"capslock"
2017-02-24 12:33:58 +00:00
"space"
2018-12-18 17:02:03 +00:00
"print"
"printscreen" // No Mac support
2019-01-09 00:11:01 +00:00
"insert"
2017-02-24 12:50:59 +00:00
"menu" Windows only
2017-02-24 12:33:58 +00:00
2017-03-02 13:50:44 +00:00
"audio_mute" Mute the volume
"audio_vol_down" Lower the volume
"audio_vol_up" Increase the volume
2017-02-24 12:33:58 +00:00
"audio_play"
"audio_stop"
2019-01-09 00:11:01 +00:00
"audio_pause"
2017-03-02 13:50:44 +00:00
"audio_prev" Previous Track
"audio_next" Next Track
2017-02-24 12:33:58 +00:00
"audio_rewind" Linux only
"audio_forward" Linux only
"audio_repeat" Linux only
"audio_random" Linux only
"num0"
2019-01-09 00:11:01 +00:00
"num1"
"num2"
"num3"
"num4"
"num5"
"num6"
"num7"
"num8"
"num9"
"num_lock"
2018-12-12 17:43:16 +00:00
"num."
"num+"
"num-"
"num*"
"num/"
"num_clear"
"num_enter"
"num_equal"
2021-11-07 20:16:32 +00:00
// // "numpad_0" No Linux support
// "numpad_0"
// "numpad_1"
// "numpad_2"
// "numpad_3"
// "numpad_4"
// "numpad_5"
// "numpad_6"
// "numpad_7"
// "numpad_8"
// "numpad_9"
// "numpad_lock"
2017-02-24 12:33:58 +00:00
2017-03-02 13:50:44 +00:00
"lights_mon_up" Turn up monitor brightness No Windows support
"lights_mon_down" Turn down monitor brightness No Windows support
"lights_kbd_toggle" Toggle keyboard backlight on/off No Windows support
"lights_kbd_up" Turn up keyboard backlight brightness No Windows support
2017-03-10 15:07:41 +00:00
"lights_kbd_down" Turn down keyboard backlight brightness No Windows support
```