Keypress: X2=0,1,2,3 won't work

The current manual states on pp. 187, 338, and 343 that:

If EVENT$ = "KEYPRESS"; X1 will be the ascii number of the character generated,
X2 contains [one of] the shift key codes, which are:
X2=1 if the shift key was held down;
X2=2 if the CTRL key was held down;
X2=3 if both shift abd Ctrl were held down; and
X2=0 if neither was held down.

This leads me to believe that if "Ctrl+x" were pressed that X1=120 and X2=2 would result. It does not. The keypress is ignored and nothing happens. The old manual also has the same instructions, in Chapter 20. This has never worked with Silver 5.31 and now not correctly with Gold 5.5b19.

Does anyone know why this this does not work?
Any help would be greatly appreciated.
Thanks

Mike C.

Comments

New TrueCtrl3.trc

Big John,
Thanks for that info. How can I get this new TrueCtrl3.trc file?

Regards, Mike C.

Ctrl+x or Ctrl+shift+x...

Dr. rwt, Thanks for the reply.

Interestingly, Ctrl+x, Ctrl+v, Ctrl+z, Ctrl+c return nothing on the 5.31 and 5.5b19 I have.
However all the other Ctrl+[lowercase letters] return 1 through 25 respectively, except for the c,v,x,z.
If Ctrl+[upper case C,V,X,Z] are used they return the missing 3,22,24,26.
That is to say, only Ctrl+Shift+c,v,x,z works.

Still can't understand why True Basic doesn't work as advertised in the manuals. This is exceedingly annoying for such an expensive piece of software.

regards,
Mike C.

KEY INPUT VALUES FROM SYS_EVENT

Hi,

Sorry about the delay in replying to this post but I only stumbled on it today.

Firstly, version 5.5b19 makes a complete hash of the whole SYS_EVENT sub routine, i.e. the core behind TC_event. The CTRL and SHIFT keys are not recognized correctly and the FUNCTION keys (f1 to F12) are completely ignored.

Secondly with version 5.31, for reasons that I cannot fathom, TC_event returns certain keystokes as MENU items which is why certain CTRL characters do not seem to work, e.g. CTRL C, CTRL X, CTRL V and CTRL Z. These keystrokes are returned as MENU events with the value of x1 between 32024 and 32029. Note that foreign language accented characters are returned as NEGATIVE characters. For this reason I created a modified version of TrueCtrl3.trc in which these irregularities are corrected so that they work like the manual says, and the accented characters are correctly numbered.

Regards
Big John

re: Ctrl-x

I'm guessing that because these are universal WINDOWS key control sequences, the operating system is grabbing them before TrueBasic can see them. Maybe Big John can comment as he must have encountered this in writing the Version 6 editor.

rwt

Manual

Depending on what John has to say about this question and how it relates between v5.x and v6, if it's determined that the manual needs updating I will take care of it straight away - one of the advantages of moving to all electronic manuals is that we can do this on the fly. Thanks for pointing it out.

re:keypress

Not sure about the problem with EVENT$, but you could use

IF KEY INPUT then
GET KEY D
! do whatever you want based on the value of D
let D = 0
end if

Put this inside a loop to keep checking for Keyboard Input.

Ctrl-x will return 24.

rwt