Shop OBEX P1 Docs P2 Docs Learn Events
full Font table access possible from keyboard? — Parallax Forums

full Font table access possible from keyboard?

HarleyHarley Posts: 997
edited 2006-09-05 15:34 in Propeller 1
I'm trying something, but don't know enough yet to figure this out. cry.gif

Using a PropSTICK and a Parallax keyboard (nicely thin, yet key travel feels good) and the Keyboard_Demo program all seems OK.

I added
term.out(kb.getkey)
term.out(",")

so I could see the code generated vs. the character. Works OK. I note the Ctrl, 'windows', and Alt keys add 200h, 400h, 800h to the code. What I was hoping for was a way to generate the codes to see the remainder of the characters of the font table.

Is there anyway to easily cause the required 080h to be added from the keyboard, without messing more with the program?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-09-04 17:56
    Each keyboard key has a key code. so some symbols [noparse][[/noparse]like numbers] may have two locations.
    Also, the right and the left shift have the same function, but two codes.

    Since there are 'non-graphic' keys like Control, Shift, Escape, Caps Lock, etc -- you can select one of these or a combination of these to add $080 to the code.

    Basically, there are 3 generations of key codes, so it might be best to look at the Propeller Assembly code and see exactly what the working key codes [noparse][[/noparse]there is a long list as there are so many keys] are [noparse][[/noparse]rather than assume the wrong set]. Often the keyboards will be able to accept an initializing sequence that will change which set is used and generally the 2nd generation is preferred.

    Most key codes are one for down and one for up, some are three bytes long and the 'Break' may be 7 bytes long. One can easily spend a month or two just studying key codes and getting a good idea of how to properly use them.

    Nonetheless, the knowledge is very worthwhile. One cannot alway depend on a mouse. Often the keyboard is faster, more precise.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • HarleyHarley Posts: 997
    edited 2006-09-04 22:39
    Kramer said...
    Each keyboard key has a key code. so some symbols [noparse][[/noparse]like numbers] may have two locations.
    Also, the right and the left shift have the same function, but two codes.
    Since there are 'non-graphic' keys like Control, Shift, Escape, Caps Lock, etc -- you can select one of these or a combination of these to add $080 to the code.
    Basically, there are 3 generations of key codes, so it might be best to look at the Propeller Assembly code and see exactly what the working key codes [noparse][[/noparse]there is a long list as there are so many keys] are [noparse][[/noparse]rather than assume the wrong set]. Often the keyboards will be able to accept an initializing sequence that will change which set is used and generally the 2nd generation is preferred.
    Most key codes are one for down and one for up, some are three bytes long and the 'Break' may be 7 bytes long. One can easily spend a month or two just studying key codes and getting a good idea of how to properly use them.
    Seems all the 'non-graphic' keys have codes beyond $080. I did add $040, $080 and $0C0 to the returned key code in the program, but no luck on getting those 'schematic symbols'. Gotta try something else. Thanks for the suggestions.

    Guess it is time to dig way down into the keyboard object and see if there is a clue there. Sure was hoping I could access them right from the Parallax keyboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • HarleyHarley Posts: 997
    edited 2006-09-04 23:45
    Re-looked at the 'TV Text Demo'. At the bottom it states "Uses internal ROM font". Maybe that is a clue. idea.gif

    Although, I did note a loop running from 0Eh to FFh for generating the codes to 'display'. So figured all I'd have to do is add 080h to 'reach' the schematic symbols+. Things aren't always easy. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • HarleyHarley Posts: 997
    edited 2006-09-05 15:29
    OK, looking further into this situation, found from the following demo information:

    1. Tv_Text_Demo uses text : "tv_text" and provides text and graphic characters.

    2. Tv_Terminal_Demo uses term : "tv_terminal" for just text.

    3. Keyboard_Demo uses term : "tv_terminal" and only displays keyboard code plus the associated key text character (my addition).

    Not sure why the 'term' vs 'text'. Seems one would serve both. But I'd guess one could use "tv_text" in the keyboard demo. But not sure how Parallax expects to access those characters above $080 from a keyboard, as there is no way I could determine for any non-character key to add the $080 offset. I suppose the IDE somehow does that.

    Any comments on easily accessing the ROM contents from a keyboard would be appreciated.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • simonlsimonl Posts: 866
    edited 2006-09-05 15:34
    Am at work at the moment, so can't test, but think you might be able to get to the char's by using ALT key plus its decimal value (e.g. ALT+255 give a non-breaking space)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
Sign In or Register to comment.