Exemple #1
0
// Show all the concurrent user actions.
func (sh *shtag) update(dev device.Device) {
	pressed := dev.Update()
	if len(pressed.Down) > 0 {
		fmt.Print(pressed.Mx, ",", pressed.My, ":")
		fmt.Print("shf:", pressed.Shift, " ctl:", pressed.Control)
		if pressed.Resized {
			fmt.Print("resized:")
		}
		if pressed.Focus {
			fmt.Print("   focus:")
		} else {
			fmt.Print(" nofocus:")
		}
		for key, duration := range pressed.Down {
			fmt.Print(key, ",", duration, ":")
		}
		fmt.Println()
	}
}
Exemple #2
0
// update handles user input
func (ld *ldtag) update(dev device.Device) {
	pressed := dev.Update()
	if pressed.Resized {
		ld.resize(dev.Size())
	}
}
Exemple #3
0
// update handles user input.
func (tb *tbtag) update(dev device.Device) {
	pressed := dev.Update()
	if pressed.Resized {
		tb.resize(dev.Size())
	}
}
Exemple #4
0
// update handles user input.
func (sf *sftag) update(dev device.Device) {
	pressed := dev.Update()
	if pressed.Resized {
		sf.resize(dev.Size())
	}
}