예제 #1
0
파일: cpress.go 프로젝트: solusipse/cpress
func Hold_key(key C.int) {
	/*
		This method changes key state to pressed until Release_key
		method is called for same key.
	*/
	C.hold_key(key)
}
예제 #2
0
파일: cpress.go 프로젝트: solusipse/cpress
func Press_combination(keys ..._Ctype_int) {
	/*
		This method had to be rewritten because of incompatibility
		of C variadic function and Go.
		It allows to do key combos, for example: CTRL+C, CTRL+ALT+F1.
	*/
	for i := range keys {
		C.hold_key(keys[i])
	}
	for i := range keys {
		C.release_key(keys[i])
	}

}