rawKey signals

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

rawKey signals

Post by richmond62 » Tue Feb 20, 2018 7:47 pm

While you may be using a Persian keyboard layout connected to a computer running Windows XP I am using a US English keyboard layout connected to a computer running Macintosh 10.7.5: which is super when we want to type in languages with which we are familiar.

It is not so super when we want to develop software for other people to use as we have no idea what sort of keyboard layout on what sort of computer with what sort of operating system they will be using.

Luckily all computer keyboards have keys that send the same signals to whatever machine they are connected to; and LiveCode can detect those signals; they are called rawKey signals. Therefore we can tell a stack/standalone that when an end user presses a key which on my keyboard layout is, say, "k", it will do what we want it to, whether that key and/or keyboard layout on the end-user's keyboard labels/assigns it as "k" or not.
kb.png
This picture has the rawKey codes for the alphabetic keys on a computer keyboard with their US English values below them.

HOWEVER, anyone can work out those rawKey codes by comparing their position in this picture with their physical keyboard.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: rawKey signals

Post by dunbarx » Tue Feb 20, 2018 8:15 pm

Richmond.

This is adorable. Can you expand it a bit to include arrow keys, keypad numbers, Page Up, spacebars and the like? That would be a nice little gadget to have taped to ones monitor.

Craig

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: rawKey signals

Post by bogs » Tue Feb 20, 2018 10:45 pm

That is pretty neat Richmond.
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”