Get the of characters of Keybaod botton

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
shalu
Posts: 72
Joined: Fri Mar 20, 2015 1:05 pm

Get the of characters of Keybaod botton

Post by shalu » Thu Oct 22, 2015 7:24 am

Hi all,

I am beginner in LiveCode, I have button and I trying to get the of characters of backspace or enter key to a button is it possible ? :oops:

Thanks
Shalu
--
Thanks
Shalu S

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10100
Joined: Fri Feb 19, 2010 10:17 am

Re: Get the of characters of Keybaod botton

Post by richmond62 » Thu Oct 22, 2015 11:39 am

Start by downloading a little stack I have made.
KeyZ.png
KeyZ.png (4.37 KiB) Viewed 3936 times
It contains this code in the cardScript:

on keyDown KD
put KD into fld "KD"
end keyDown

on rawKeyUp KU
put KU into fld "RD"
end rawKeyUp

So, when you press a key and then let it go you will get the keyCode in the top window
and the rawKeyCode in the bottom window.

Now, once you have used that stack to determine the rawKeyCode for backSpace you can assign that code to any key on your keyboard you want:

on keyDown KD
if KD = "q" then
put numToCodePoint(65288)
end if
end keyDown
Attachments
KeyZ.zip
Here's the stack
(660 Bytes) Downloaded 217 times

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Get the of characters of Keybaod botton

Post by Klaus » Thu Oct 22, 2015 12:32 pm


bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Get the of characters of Keybaod botton

Post by bn » Thu Oct 22, 2015 3:12 pm

Hi Klaus,

in another thread someone ask if samjith and shall is the same person. The reply was that they are collaborators. Apparently they ask similar questions in a very similar style.
Maybe they should talk to each other a little more. And get to the basics of Livecode a little more. There is the language guide, there are the lessons http://lessons.runrev.com

I am missing your link to the "conferences"...

Kind regards
Bernd

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Get the of characters of Keybaod botton

Post by Klaus » Thu Oct 22, 2015 4:55 pm

Hi Bernd,
bn wrote:Maybe they should talk to each other a little more.
that's exactly what I meant :-)
bn wrote:I am missing your link to the "conferences"...
I already pointed both of them to the URL! 8)


Best

Klaus

shalu
Posts: 72
Joined: Fri Mar 20, 2015 1:05 pm

Re: Get the of characters of Keybaod botton

Post by shalu » Fri Nov 06, 2015 4:56 am

Hi all,

Samjith is a different person. I and Samjith have the same project. Samjith already asked the question for which he didn't get an exact output.
That's why I asked the same question. :) :lol:

Thanks
Shalu
--
Thanks
Shalu S

Post Reply