Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6194 closed defect (fixed)

DREAMWEB: M key does not work in Network Monitor

Reported by: misterhands Owned by: digitall
Priority: normal Component: Engine: Dreamweb
Keywords: Cc:
Game: Dreamweb

Description

Latest Win64 snapshot
Dreamweb Freeware CD UK

The title says it all, except that I use an AZERTY keyboard.

Also the ,? key (that's where the M key would be on a QWERTY keyboard) acts a bit strangely:
if you press it on a blank line nothing happens;
if you press it on a non blank line it behaves like the SPACE key.

Ticket imported from: #3590814. Ticket imported from: bugs/6194.

Attachments (1)

DREAMWEB.D00 (13.3 KB ) - added by misterhands 7 years ago.

Download all attachments as: .zip

Change History (13)

by misterhands, 7 years ago

Attachment: DREAMWEB.D00 added

comment:1 by digitall, 7 years ago

Owner: set to digitall
Summary: Dreamweb: M key does not work in NetworkDREAMWEB: M key does not work in Network Monitor

comment:2 by digitall, 7 years ago

misterhands: Thanks for the bug report. This looks like a similar issue to your previous bug #3539031 wrt. Lure engine:
https://sourceforge.net/tracker/index.php?func=detail&aid=3539031&group_id=37116&atid=418820

The fix should be similar i.e. to change text input to using ascii, rather than keycode.

comment:3 by digitall, 7 years ago

misterhands: To clarify, can you confirm when you say "it behaves like the SPACE key", do you mean it inserts a space character to the monitor line, or that it locks the monitor scrolling (as per SPACE Key during long text printing)?
(This is an emulation within the game of the nowadays fairly unused https://en.wikipedia.org/wiki/Scroll_lock function)

Have added debugging output to the keyboard functions. Please download the latest nightly master build and test with "scummvm -d 1" from a command prompt window to get debug output text and paste the relevant section here.

For reference, I get "DreamWebEngine::processEvents() KeyDown keycode:109 ascii:0x6d" for a lower case 'm' i.e. M and "DreamWebEngine::processEvents() KeyDown keycode:109 ascii:0x4d" for an upper case 'M' i.e. SHIFT+M on my QWERTY Keyboard.

comment:4 by misterhands, 7 years ago

What I meant was that it inserts a space character.

BTW I didn't know that you could scroll lock with the space key.
I must have missed that bit when reading the (f******) manual.
I found that the fast scrolling speed made reading difficult, and in fact I was about to locate the relevant resource file and read it with a hex editor !
So thanks for saving me the trouble :-)

I tried the latest nightly, but I got nothing in debug level 1.
Had to crank it to 11 to get some output when typing.
For example I get "key pressed = 004c" when hitting the L key.
But there is no output at all when typing M.
It looks like your last commit adding debugging output came one hour too late to make it into the nightly... guess I'll have to try again tomorrow then.

I'll consider setting everything up and compiling ScummVM on my own as I find myself dealing with bugs regularly !

Thanks

comment:5 by digitall, 7 years ago

misterhands: Hmm.. That could be a space or an unprintable character...

The scroll lock function is noted at the bottom of page 15 of the user manual, at the end of the "Using the Network Monitor" section, though I only noticed it when I looked at the source code.

Apologies for that. Please try with the next nightly build from:
http://buildbot.scummvm.org/builds.html

comment:6 by misterhands, 7 years ago

No problem.

Here is what I get.
lower case m :
DreamWebEngine::processEvents() KeyDown keycode:59 ascii:0x6d

upper case M :
DreamWebEngine::processEvents() KeyDown keycode:59 ascii:0x4d

Let me know if you need anything else.

comment:7 by digitall, 7 years ago

misterhands: Thanks for that. To confirm, is that when you present the key marked "M" on your AZERTY keyboard, or the key which is marked ", ?" i.e. the one where M should be? Either way, confirm which and if you could attach the codes from pressing the "other" key, then that would be useful.

I think some of this code will need changing from keycode to ascii usage, but I need to be sure that I'm not going to break something! :)

comment:8 by misterhands, 7 years ago

That was for the actual M key on my keyboard.
The output for the ",?" key is as follows :

lower case :
DreamWebEngine::processEvents() KeyDown keycode:109 ascii:0x2c

upper case :
DreamWebEngine::processEvents() KeyDown keycode:109 ascii:0x3f

Yes the original game ignores DOS codepage or keyboard layout and runs in "QWERTY mode" so a conversion to ascii will probably be needed.
Oddly enough, only the M key is affected, the other typical problematic keys (AZQW) are fine in ScummVM's implementation...

Anyway I"m sure that you will sort this out as usual ! :-)

Thanks

comment:9 by criezy, 7 years ago

@tdhs I just looked at the code and this is indeed the same bug as #3539031. It is simply not correct to test the keycode values to check if a character is in [a-z] and [0-9]. You need to test on the ascii value.

I can commit a fix if you want.

comment:10 by criezy, 7 years ago

Fix committed in commit 674c625.

This also fixes issues with qwerty and azerty layouts when using the number keys at the top of the keyboard. This would give strange characters when using SHIFT with a qwerty keyboard and when not using shift with an azerty keyboard.

comment:11 by criezy, 7 years ago

Resolution: fixed
Status: newclosed

comment:12 by digitall, 7 years ago

criezy: Thanks for fixing this.

Note: See TracTickets for help on using tickets.