示例#1
0
文件: sdl.go 项目: kearsley/Go-SDL
// Gets the name of an SDL virtual keysym
func GetKeyName(key Key) string {
	GlobalMutex.Lock()
	name := C.GoString(C.SDL_GetKeyName(C.SDLKey(key)))
	GlobalMutex.Unlock()
	return name
}
示例#2
0
文件: sdl.go 项目: gnanderson/Go-SDL
// Gets the name of an SDL virtual keysym
func GetKeyName(key Key) string { return C.GoString(C.SDL_GetKeyName(C.SDLKey(key))) }
示例#3
0
文件: input.go 项目: krig/Go-SDL2
// Gets the name of an SDL virtual keysym
func GetKeyName(key int32) string {
	name := C.GoString(C.SDL_GetKeyName(C.SDL_Keycode(key)))
	return name
}
示例#4
0
func GetKeyName(key Keycode) string {
	_key := (C.SDL_Keycode)(key)
	return (C.GoString)(C.SDL_GetKeyName(_key))
}
示例#5
0
文件: keyboard.go 项目: willemvds/sdl
func (k Keycode) GetName() string {
	return C.GoString(C.SDL_GetKeyName(k.c()))
}
示例#6
0
func GetKeyName(code Keycode) string {
	return (C.GoString)(C.SDL_GetKeyName(code.c()))
}