// Release transmits a release (key-up) event for the given Keycode.
//
// See godoc comment on method Press() for details on what input is accepted and
// how it is interpreted.
Release transmits a release (key-up) event for the given Keycode.

See godoc comment on method Press() for details on what input is accepted and
how it is interpreted.
// Release transmits a release ( key - up ) event for the given Keycode . // // See godoc comment on method Press () for details on what input is accepted and // how it is interpreted .
func (kb *Keyboard) Up(c Keycode) error {
	msb := c >> 8
	if msb >= 0xC2 {
		if msb < 0xE0 {
			c = ((msb & 0x1F) << 6) | Keycode(c.key())
		} else {
			switch msb {
			case 0xF0:
				return kb.up(uint8(c), 0)
			case 0xE0:
				return kb.up(0, uint8(c))
			case 0xE2:
				return kb.upSys(uint8(c))
			default:
				if 0xE4 <= msb && msb <= 0xE7 {
					return kb.upCon(uint16(c & 0x03FF))
				}
				return ErrInvalidKeycode
			}
		}
	}
	c = keycode(uint16(c))
	if 0 == c {
		return ErrInvalidCodepoint
	}
	return kb.up(c.key(), c.mod())
}
func ( kb * Keyboard ) Up ( c Keycode ) error { msb := c >> 8 if msb >= 0xC2 { if msb < 0xE0 { c = ( ( msb & 0x1F ) << 6 ) | Keycode ( c . key ( ) ) } else { switch msb { case 0xF0 : return kb . up ( uint8 ( c ) , 0 ) case 0xE0 : return kb . up ( 0 , uint8 ( c ) ) case 0xE2 : return kb . upSys ( uint8 ( c ) ) default : if 0xE4 <= msb && msb <= 0xE7 { return kb . upCon ( uint16 ( c & 0x03FF ) ) } return ErrInvalidKeycode } } } c = keycode ( uint16 ( c ) ) if 0 == c { return ErrInvalidCodepoint } return kb . up ( c . key ( ) , c . mod ( ) ) }
Release transmits a release (key-up) event for the given Keycode.
Release transmits a release ( key - up ) event for the given Keycode .