none
I need a map of a keyboard for my idea of an email client! RRS feed

  • Question

  • Hello all~

    I am creating an email client type program with Small Basic that will count characters every time a key on the keyboard is pressed. The only thing is: I need it to ignore certain keys such as Caps Lock, Shift, Control, Fn, Alt, Tab, and a few of the others that aren't used in the English language. I need it to count only the letters, symbols, and numbers. I am wondering where I can get a picture of a keyboard diagram with the keys numbered. I know that Esc is 1, F1 is 2, etc... but I don't know them all. If anyone knows where I can find a picture, please tell me!

    [I know that I can use GraphicsWindow.LastKey to determine what was pressed (ie: If GraphicsWindow.LastKey = 47 Then...)]

    Thanks in advance!

    -JOman


    I can write 1000 lines of code in roughly 10 seconds. Here's how:
    i = 1

    For i = 1 to 1000
    TextWindow.WriteLine(i+ ". Code")
    Program.Delay(10)
    EndFor

    Make Sense?

    Tuesday, July 2, 2013 4:46 AM

Answers

  • You could test the input against an array of characters (letters, numbers, ...) and count only the valid ones.

    I too could not find a map of a keyboard. That's why I wrote a little program :-)

    RFM518

    It gives you the name of the key you press. (Please don't click on the TextBox - click somewhere on the white border)


    • Edited by Florian Auer Tuesday, July 2, 2013 8:52 AM spelling error
    • Proposed as answer by litdevModerator Tuesday, July 2, 2013 7:54 PM
    • Marked as answer by Joman Mied Thursday, July 4, 2013 5:24 AM
    Tuesday, July 2, 2013 7:59 AM
  • Show RFM518-0. It is a sample to define not alowed key.


    Best Regards Martin

    • Proposed as answer by litdevModerator Tuesday, July 2, 2013 7:54 PM
    • Marked as answer by Joman Mied Thursday, July 4, 2013 5:24 AM
    Tuesday, July 2, 2013 11:00 AM

All replies

  • You could test the input against an array of characters (letters, numbers, ...) and count only the valid ones.

    I too could not find a map of a keyboard. That's why I wrote a little program :-)

    RFM518

    It gives you the name of the key you press. (Please don't click on the TextBox - click somewhere on the white border)


    • Edited by Florian Auer Tuesday, July 2, 2013 8:52 AM spelling error
    • Proposed as answer by litdevModerator Tuesday, July 2, 2013 7:54 PM
    • Marked as answer by Joman Mied Thursday, July 4, 2013 5:24 AM
    Tuesday, July 2, 2013 7:59 AM
  • Show RFM518-0. It is a sample to define not alowed key.


    Best Regards Martin

    • Proposed as answer by litdevModerator Tuesday, July 2, 2013 7:54 PM
    • Marked as answer by Joman Mied Thursday, July 4, 2013 5:24 AM
    Tuesday, July 2, 2013 11:00 AM
  • You could test the input against an array of characters (letters, numbers, ...) and count only the valid ones.

    I too could not find a map of a keyboard. That's why I wrote a little program :-)

    RFM518

    It gives you the name of the key you press. (Please don't click on the TextBox - click somewhere on the white border)


    Oh, so GraphicsWindow.LastKey doesn't detect the decimal value of the keys? Or even hexadecimal? 

    Thanks for this little application! It will help me soooo much!


    I can write 1000 lines of code in roughly 10 seconds. Here's how:
    i = 1

    For i = 1 to 1000
    TextWindow.WriteLine(i+ ". Code")
    Program.Delay(10)
    EndFor

    Make Sense?

    Wednesday, July 3, 2013 3:45 AM
  • Show RFM518-0. It is a sample to define not alowed key.


    Best Regards Martin

    Thanks Martin! This is a great "troubleshooting" type program for the keys, this will also help me quite a bit :)

    Thanks again!


    I can write 1000 lines of code in roughly 10 seconds. Here's how:
    i = 1

    For i = 1 to 1000
    TextWindow.WriteLine(i+ ". Code")
    Program.Delay(10)
    EndFor

    Make Sense?

    Wednesday, July 3, 2013 3:47 AM