func main() { var ch int fmt.Print("Enter Password: "******"*") } }
func main() { var ch int fmt.Println("Press END to quit") for ch != 152 { // Good for special keys: Arrows, PgUp, PgDn, Home, End. ch = keyboard.ReadKey() fmt.Printf("[%d][%c]\n", ch, ch) } }
func main() { var ch int var pw []int fmt.Print("Enter Password: "******"%c", ECHO[len(pw)-1]) } fmt.Println("\n") }
func main() { var ch int fmt.Print("Do you wish to continue? (Y/n): ") ch = keyboard.ReadKey() switch ch { case 89, 121: fmt.Print("Yes") case 78, 110: fmt.Print("No") default: fmt.Print("Yes") } fmt.Println("\n\n") }