A view weeks ago I've released a small project named "simple text writer / notepad" wich works very well, but I can not detect if the user want to type some punctuation marks like ",.-;:_+#*'".
The next problems are the multiple keyboard layouts, like the english and the german one.
GP doesn't recognizes if I press "y" so it outputs "z" (QUERTY and QUERTZ).
Okay if GP would recognize all keys on an QUERTY keyboard correctly, it would be aczeptable (for the beginning) but currently GP doesn't!
Code: Select all
whenKeyPressed 'any' 'key'
self_setStageColor (colorHSV ((at (codePoints key) 1) / 4) 1 1)
self_say key
if ((containsSubString key 'arrow' 1) == 0) {
if (key == 'space') {
setShared 'text' (join (shared 'text') ' ')
} (key == 'enter') {
setShared 'text' (join (shared 'text') (newline))
} (key == 'tab') {
setShared 'text' (join (shared 'text') ' ')
} (key == 'delete') {
setShared 'text' (joinStrings (copyFromTo (letters (shared 'text')) 1 ((count (letters (shared 'text'))) - 1)))
} (and (contains (range 1 9) (toNumber key)) (keyIsDown 'shift')) {
setShared 'text' (join (shared 'text') (string ((at (codePoints key) 1) - 16)))
} else {
if (keyIsDown 'shift') {
setShared 'text' (join (shared 'text') (toUpperCase key))
} else {
setShared 'text' (join (shared 'text') key)
}
}
}
}
What is wrong with moy script or the way how GP is detecting keys???
Please help!