Skip to content

Commit e82a51d

Browse files
authored
updating keyTyped() for dev-2.0 branch
1 parent 4d6493b commit e82a51d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/events/keyboard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ function keyboard(p5, fn){
663663

664664
};
665665

666-
667666
/**
668667
* A function that's called once when keys with printable characters are pressed.
669668
*
@@ -795,7 +794,7 @@ function keyboard(p5, fn){
795794
* </div>
796795
*/
797796
fn._onkeypress = function(e) {
798-
if (e.which === this._lastKeyCodeTyped) {
797+
if (e.which === this._lastKeyCodeTyped && e.repeat) {
799798
// prevent multiple firings
800799
return;
801800
}

0 commit comments

Comments
 (0)