Beispiel #1
0
// 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
}
Beispiel #2
0
func GetScancodeFromKey(key int32) int32 {
	return int32(C.SDL_GetScancodeFromKey(C.SDL_Keycode(key)))
}
Beispiel #3
0
// Gets the name of an SDL virtual keysym
func GetKeyName(key Key) string {
	GlobalMutex.Lock()
	name := C.GoString(C.SDL_GetKeyName(C.SDL_Keycode(key)))
	GlobalMutex.Unlock()
	return name
}
Beispiel #4
0
func (code Keycode) c() C.SDL_Keycode {
	return C.SDL_Keycode(code)
}
Beispiel #5
0
func (k Keycode) c() C.SDL_Keycode {
	return C.SDL_Keycode(k)
}