getKey command

166 views
Skip to first unread message

math7

unread,
May 22, 2013, 5:02:16 PM5/22/13
to tins...@googlegroups.com
Hi, is there a command programming on the calculator or LUA command to get the code of a key pressed in the Nspire? This would be very helpful in making the keys are programmable, I saw that this command does exist on the TI-84, the getKey command.

Steve Arnold

unread,
May 22, 2013, 6:46:29 PM5/22/13
to tins...@googlegroups.com
on.charIn(key) will do just this.

Tutorial 4 covers this:

http://compasstech.com.au/TNS_Authoring/Scripting/script_tut4.html

With best wishes,
Steve
_________________
Dr Stephen Arnold
Educational Technology Consultant
Compass Learning Technologies

T3 Fellow, Teachers Teaching with Technology Australia

Office: +61-2-4962-5831
Mobile: +61-4-0175-3834
US cell: +1 (508) 869 4350
UK cell: +44 79 2425 1196
Web: http://compasstech.com.au
_________________    
Sent from my iPad


On 23/05/2013, at 7:02 AM, math7 <jale...@gmail.com> wrote:

Hi, is there a command programming on the calculator or LUA command to get the code of a key pressed in the Nspire? This would be very helpful in making the keys are programmable, I saw that this command does exist on the TI-84, the getKey command.

--
--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
https://sites.google.com/site/tinspiregroup/classroom-news/welcome-abouttime
 
---
You received this message because you are subscribed to the Google Groups "tinspire" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinspire+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

math7

unread,
May 22, 2013, 10:18:22 PM5/22/13
to tins...@googlegroups.com



Thank you very much Steve, I believe that this event serves me partly because I need to be captured when you press any key, for example the [+] or [EE] but on.charIn I think it only serves to characters or not? 

Kind regards, 

math7

unread,
May 22, 2013, 10:32:01 PM5/22/13
to tins...@googlegroups.com
I would like to make a program to assign a formula or program to a specific key and when to run after the arguments put Realize the function I assigned to the key, ie each key on the Nspire can perform more than one function combination with the [ctrl] or [shift]

Steve Arnold

unread,
May 23, 2013, 12:33:29 AM5/23/13
to tins...@googlegroups.com
I think you will find that charIn recognises any character typed or entered from the keyboard. So ones like the EEcomes through as E. If you wanted to set up a condition involving special characters like this, use the Symbol Palette in, say, a Notes page. Enter the character, then copy and paste it into your script.

Should work fine.


With best wishes,
Steve
_________________
Dr Stephen Arnold
Educational Technology Consultant
Compass Learning Technologies

T3 Fellow, Teachers Teaching with Technology Australia

Office: +61-2-4962-5831
Mobile: +61-4-0175-3834
US cell: +1 (508) 869 4350
UK cell: +44 79 2425 1196
Web: http://compasstech.com.au
_________________    
Sent from my iPad


On 23/05/2013, at 12:18 PM, math7 <jale...@gmail.com> wrote:




Thank you very much Steve, I believe that this event serves me partly because I need to be captured when you press any key, for example the [+] or [EE] but on.charIn I think it only serves to characters or not? 

Kind regards, 

--

John Hanna

unread,
May 23, 2013, 7:31:41 AM5/23/13
to tins...@googlegroups.com
And what do non-character keys produce?
Sorry, I'm not at a computer to test it.

John Hanna

Adriweb

unread,
May 23, 2013, 8:31:24 AM5/23/13
to tins...@googlegroups.com
It works too :

I tested some unusual things : 
sin(
=
^
^2
10^(
exp(
(
)
*
[ [,] [,]]
/
-
+
"

With the 3.2 software, add a lua script with only this : 

on.charIn = print

and press a key (directly on your keyboard or on the smartview frame). its corresponding value will be printed in the console.

math7

unread,
May 23, 2013, 1:25:33 PM5/23/13
to tins...@googlegroups.com
yes already tried it and it works for almost all the keyboard, but not to enter keys, ctrl, shift, etc..

 thanks to all

math7

unread,
May 23, 2013, 1:28:17 PM5/23/13
to tins...@googlegroups.com
HOla Steve, could you give me an example how to do that in the Notes application? thank you very much

Steve Arnold

unread,
May 23, 2013, 5:05:38 PM5/23/13
to tins...@googlegroups.com
Sorry - Lua only. Can't do it in Notes unless you store a variable from Lua and then display in a MathBox?

Also, Lua cannot recognise shift, ctrl etc key additions as far as I know. 


With best wishes,
Steve
_________________
Dr Stephen Arnold
Educational Technology Consultant
Compass Learning Technologies

T3 Fellow, Teachers Teaching with Technology Australia

Office: +61-2-4962-5831
Mobile: +61-4-0175-3834
US cell: +1 (508) 869 4350
UK cell: +44 79 2425 1196
Web: http://compasstech.com.au
_________________    
Sent from my iPad

math7

unread,
May 23, 2013, 5:16:12 PM5/23/13
to tins...@googlegroups.com
Now I understand that


Kind Regards Steve

DAVID YOUNG

unread,
May 24, 2013, 1:51:30 PM5/24/13
to tins...@googlegroups.com, dayo...@gmail.com
Has anyone purchased just the Navigator wifi caps for the CX units? What
did you have to pay?
DAY

--
David Young
Fayetteville
Mathematics - Sciences - Tech
dayo...@gmail.com
davida...@fayar.net

http://militantgrammarian.com/DAY/

"Good enough is not good enough."
-Sizer, Goodlad and many other agents of change

Reply all
Reply to author
Forward
0 new messages