Processing, keyReleased()
用法介紹。
用法
keyReleased()
keyReleased(event)
返回
void
說明
每次釋放鍵時都會調用一次keyReleased()
函數。釋放的 key 將存儲在key
變量中。有關詳細信息,請參閱key
和keyCode
。
鼠標和鍵盤事件僅在程序具有 draw()
時起作用。如果沒有 draw()
,代碼隻運行一次,然後停止監聽事件。
例子
// Click on the image to give it focus,
// and then press any key.
int value = 0;
void draw() {
fill(value);
rect(25, 25, 50, 50);
}
void keyReleased() {
if (value == 0) {
value = 255;
} else {
value = 0;
}
}
相關用法
- Processing keyCode用法及代碼示例
- Processing keyPressed用法及代碼示例
- Processing keyPressed()用法及代碼示例
- Processing key用法及代碼示例
- Processing keyTyped()用法及代碼示例
- Processing FFT用法及代碼示例
- Processing SawOsc.pan()用法及代碼示例
- Processing FloatDict用法及代碼示例
- Processing FFT.stop()用法及代碼示例
- Processing join()用法及代碼示例
- Processing () (parentheses)用法及代碼示例
- Processing Pulse用法及代碼示例
- Processing PShader用法及代碼示例
- Processing PVector.set()用法及代碼示例
- Processing FloatDict.sortKeysReverse()用法及代碼示例
- Processing texture()用法及代碼示例
- Processing IntDict.add()用法及代碼示例
- Processing PShape.enableStyle()用法及代碼示例
- Processing FloatDict.sub()用法及代碼示例
- Processing String用法及代碼示例
- Processing PImage.pixels[]用法及代碼示例
- Processing vertex()用法及代碼示例
- Processing PVector.mag()用法及代碼示例
- Processing thread()用法及代碼示例
- Processing Capture.stop()用法及代碼示例
注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 keyReleased()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。