|
Forum Index : Microcontroller and PC projects : GETCHAR$()
| Author | Message | ||||
| romba6 Newbie Joined: 04/07/2020 Location: United KingdomPosts: 37 |
I have a CMM2 program that uses the command C$ = getchar$() no further usage to it - it is clearly working within the program, but I can't find any reference to it in any manual or the forum - any help on it please ? CHAR_OUT$ = INKEY$ if CHAR_OUT$ <> "" then if CHAR_OUT$ = chr$(137) then download end if if CHAR_OUT$ = chr$(136) then upload end if C$ = getchar$() 'not sure what this does if altflag% = 1 then 'check for ALT being asserted select case lcase$(C$) 'turn all characters to lowercase Edited 2021-01-23 04:24 by romba6 |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1680 |
Hi, I (respectively Google) found this : FUNCTION Getchar(char as integer) as integer local as integer i=char<<3 Getchar=PEEK(WORD AddrOfFont+i)+(PEEK(WORD AddrOfFont+i+4)<<32) END FUNCTION An user defined function made by Peter (matherp). Regards Michael Edit: I would try to replace it with INKEY$ or KEYDOWN(1). Edited 2021-01-23 05:38 by twofingers causality ≠ correlation ≠ coincidence |
||||
| frnno967 Senior Member Joined: 02/10/2020 Location: United StatesPosts: 105 |
It's a function I adapted for Maxiterm from Rich Martin's esp8266lib that is used to determine the status of ALT and WIN keys along with a key press. The getchar function looks at keyboard characters that are typed, checks for the presence of ALT and WIN keys, then passes that to the select case statement for activating various program features like the help menus and such. Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer. |
||||
| romba6 Newbie Joined: 04/07/2020 Location: United KingdomPosts: 37 |
Thankyou Michael for the info, what an interesting link too - I wish I had kept my old Nokia phones !!! |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1680 |
I think Jay did it! ![]() causality ≠ correlation ≠ coincidence |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |