dMZX Forums: Most "KEY" Counters No Longer Work At All -> MegaZeux Bugs -> Tracker

Jump to content

Report ID 841 Title Most "KEY" Counters No Longer Work At All
Product MegaZeux Bugs Status UNFILED (Severity 0 - None Assigned)
Version 2.90 Fixed in -
Introduced In Version 2.90Operating System Windows

Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

Report ID #841: Most "KEY" Counters No Longer Work At All

#1 User is offline  
Joseph Collins 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 31
  • Joined: 10-October 02
  • Gender:Not Telling
  • Location:United States

Posted 05 February 2024 - 03:28 PM

Note: I split this off from the linked Related Issue because this seems to be its own issue.

Issue: "KEY_CODE", "KEY_PRESSED", and "KEYn" seemingly no longer function.
Versions Affected: v2.90 onward
Introduced in Version: v2.90
Operating System: Windows, DOS (2.93), likely others

Further Details
From what I've observed, It seems like "KEY_PRESSED", "KEY_CODE", and "KEYn" counters are pretty much non-functional in versions 2.90 and higher? No amount of anything I did would get them to change from a value of 0 despite the fact that I was able to get values for all pressed keys in the Debug Window. The only thing I can think of is that, perhaps, there's some sort of "enable code" I need to, uh, enable before they respond? Seems like an odd, undocumented change, if so.

I couldn't get "KEY_PRESSEDn" to work in versions 2.84c or 2.93, either, but it's plausible that I simply don't know how that one works. (I tried both 71 and 278 for "Page Up" with no luck.)

Related Issues

This post has been edited by Joseph Collins: 11 February 2024 - 08:04 AM



Page 1 of 1  
  • Cannot start a new Issue
  • You cannot reply to this issue

Replies (1 - 2)

#2 User is online  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,949
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 07 February 2024 - 10:37 PM

There are a large number of games and utilities that rely on these counters which show no noticeable issues in the cited versions. 278/71 are the MegaZeux/PC-XT keycodes for HOME, not Page Up. If you were checking KEY(71) or KEY_PRESSED(278) and pressing any key other than Home, that would explain why those counters didn't appear to work for you.

Here is a short Robotic program that latches onto the values of KEY_CODE and KEY_PRESSED and displays them. On my end, the values it displays are identical to the debug window (even in the DOS build of 2.93).
: "l"
if "key_pressed" != 0 then "#p"
if "key_code" != 0 then "#c"
* "~a&c& ~d&p&"
wait for 1
goto "l"
: "#p"
set "p" to "key_pressed"
goto "#return"
: "#c"
set "c" to "key_code"
goto "#return"


edit: KEY_PRESSEDn (but not KEY_PRESSED) is a new counter in 2.93, so that wouldn't work in older versions.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Joseph Collins 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 31
  • Joined: 10-October 02
  • Gender:Not Telling
  • Location:United States

Posted 08 February 2024 - 03:45 AM

Disregard. The issue was a misunderstanding on my part. As stated above, MegaZeux never had access to the Home, End, Page Up, or Page Down buttons:

Joseph Collins, on 07 February 2024 - 10:40 PM, said:

[…] Further testing reveals that, as far as the "KEY" counter in MegaZeux version 2.50 is concerned, the Home, End, Page Up, and Page Down keys are actually 7, 1, 9, and 3 [and] for some reason, tromdage also mirrored functionality of the Home Row Numbers to the Number Pad.

Furthermore, the emulation of version 2.xx does not replicate this behavior. So, while that is a completely different bug / oversight, this "bug" isn't a bug.

Thank you.

This post has been edited by Joseph Collins: 08 February 2024 - 04:27 AM

I'm not that hard to find… if you know where to look.
-=( https://jolikmc.tumblr.com )=-


Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2025  IPS, Inc.