top of page
CODE
$w.onReady(function () { });
export function textBox1_keyPress(event) {console.log("Key-Pressed")
const pressedKey = (event.key).toString()
const keyCode = event.key.charCodeAt(0)
const textLENGTH = $w('#RTXT0').value.length-6
​
console.log(event.key)
console.log(keyCode)
console.log(textLENGTH)
console.log($w('#RTXT0').value)
​
$w('#TXTpressedkey').text = pressedKey.toString()
$w('#TXTkeycode').text = keyCode.toString()
$w('#txt2').text = pressedKey.toString()
if(pressedKey==="Enter") {console.log("ENTER pressed")
$w('#txt2').text = pressedKey.toString()
}
else {}
}
bottom of page