Giter Site home page Giter Site logo

Comments (20)

mithrendal avatar mithrendal commented on June 6, 2024 3

Btw: I worked hard for a virtual keyboard over the weekend πŸ˜…. I saw that for your favorite game you need to press run/stop to continue. Now with the virtual keyboard you find all those special keys 😎

I published it to gh-pages. Press button β€žkeyboardβ€œ

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

Hi @sy2002
tried it and it five times and it always worked ...

grafik

I can't start though because it want's me to hit the run/stop key which is not yet mapped 😫
But there will be soon a virtual keyboard ... be patient

It seems that the commodore key got stuck ... somehow ...

I saw the described behaviour some weeks ago a few times too. I could end it with hitting the Commodore key which is mapped to the OS key this one ...
FC9B7A13-AF05-464C-B3FF-571748617B05

I looked at your video and we are lucky ... you recorded the wasm_key( ... ) calls maybe I can find whats wrong with the information in it...

When you encounter the problem again could you try to hit the commodore key a few times and see whether it goes away?

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

A quick look into the wasm_key() call sequence of your video revealed that you tried to type "load". My guess is that something during drag and drop activated the commodore-key and that it was active inside the core while you typed the right sequence ... have to look into that ...

from virtualc64web.

sy2002 avatar sy2002 commented on June 6, 2024

@mithrendal about your question:

When you encounter the problem again could you try to hit the commodore key a few times and see whether it goes away?

Yes - you are right: I still can very easily reproduce the problem - it happens 4 out of 5 times on my machine.

BUT: When I hammer the Apple key (Commodore key) after the problem arises then the problem goes away :-)

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

that means that sometimes the commodore key is pressed by the drag and drop operation ... somehow ... and because it stays activated .... there supposedly happened no key release of the commodore key...
πŸ€”
how can that be ... strange ... On my machine I swear that I saw this once or twice but I can not reproduce ... I bet it is a timing issue ... (my machine is old) ...

When this happens could you please pause the emulator and paste here the content of the log textbox area please ? So we can see what keys have been triggered...

from virtualc64web.

sy2002 avatar sy2002 commented on June 6, 2024

I reproduced it again - here comes the content of the log textbox:

constructing C64 ...
adding a listener to C64 message queue...
vC64 message=MSG_PAL, data=0
vC64 message=MSG_VC1541_ATTACHED_SOUND, data=1
vC64 message=MSG_VC1541_ATTACHED, data=1
vC64 message=MSG_VC1541_RED_LED_OFF, data=1
vC64 message=MSG_VC1541_MOTOR_OFF, data=1
vC64 message=MSG_VC1541_NO_DISK, data=1
vC64 message=MSG_DISK_SAVED, data=1
vC64 message=MSG_PAL, data=0
vC64 message=MSG_NO_CARTRIDGE, data=0
vC64 message=MSG_CART_SWITCH, data=0
vC64 message=MSG_IEC_BUS_IDLE, data=0
vC64 message=MSG_VC1541_ATTACHED, data=1
vC64 message=MSG_VC1541_RED_LED_OFF, data=1
vC64 message=MSG_VC1541_MOTOR_OFF, data=1
vC64 message=MSG_VC1541_NO_DISK, data=1
vC64 message=MSG_DISK_SAVED, data=1
vC64 message=MSG_VC1541_DETACHED, data=2
vC64 message=MSG_VC1541_RED_LED_OFF, data=2
vC64 message=MSG_VC1541_MOTOR_OFF, data=2
vC64 message=MSG_VC1541_NO_DISK, data=2
vC64 message=MSG_DISK_SAVED, data=2
vC64 message=MSG_VC1530_NO_TAPE, data=0
vC64 message=MSG_VC1530_PROGRESS, data=0
vC64 message=MSG_WARP_OFF, data=0
vC64 message=MSG_ALWAYS_WARP_OFF, data=0
set SID to freq= 44100
got hardware accelerated renderer ...
Size changed: 392, 248
wrapper calls 4x c64->loadRom(...) method
wrapper calls run on c64->run() method
vC64 message=MSG_ROM_MISSING, data=0
after run ...
load file=basic_rom.bin len=8192
isBIN
Loaded ROM image basic_rom.bin.
detected rom_type=basic_rom.
load file=kernal_rom.bin len=8192
isBIN
Loaded ROM image kernal_rom.bin.
detected rom_type=kernal_rom.
load file=char_rom.bin len=4096
isBIN
Loaded ROM image char_rom.bin.
detected rom_type=char_rom.
load file=vc1541_rom.bin len=16384
isBIN
Loaded ROM image vc1541_rom.bin.
vC64 message=MSG_READY_TO_RUN, data=0
detected rom_type=vc1541_rom.
wasm_run
vC64 message=MSG_RUN, data=0
vC64 message=MSG_IEC_BUS_BUSY, data=0
vC64 message=MSG_IEC_BUS_IDLE, data=0
vC64 message=MSG_VC1541_RED_LED_ON, data=1
vC64 message=MSG_VC1541_MOTOR_ON, data=1
vC64 message=MSG_VC1541_HEAD_DOWN, data=1
vC64 message=MSG_VC1541_RED_LED_OFF, data=1
vC64 message=MSG_VC1541_MOTOR_OFF, data=1
vC64 message=MSG_IEC_BUS_BUSY, data=0
vC64 message=MSG_IEC_BUS_IDLE, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
wasm_key ( 7, 5, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
wasm_key ( 7, 5, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 7, 5, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
load file=Great_Giana_Sisters.d64 len=174848
isD64
vC64 message=MSG_VC1541_DISK, data=1
vC64 message=MSG_DISK_SAVED, data=1
vC64 message=MSG_VC1541_DISK_SOUND, data=1
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
wasm_key ( 5, 2, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 5, 2, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 4, 6, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 4, 6, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 1, 2, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 2, 2, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 1, 2, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 2, 2, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
wasm_halt
vC64 message=MSG_HALT, data=0

P.S: I love your virtual keyboard - great job!

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

P.S: I love your virtual keyboard - great job!

Thank you. I love πŸ’• it too. I still like to add that when you type shift or capslock that it displays the alternate key labels.

Concerning the bug your log showed the root cause.

You see it hereπŸ‘»πŸ‘»πŸ‘»

wasm_key ( 7, 5, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
wasm_key ( 7, 5, 0 ) 
vC64 message=MSG_KEYMATRIX, data=0
wasm_key ( 7, 5, 1 ) 
vC64 message=MSG_KEYMATRIX, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
load file=Great_Giana_Sisters.d64 len=174848
isD64

Somehow cmd key is pressed during drag and drop operation.
751 press 750 release 751 press

After it is loaded the system does not release the cmd key. That is there is no 750 in the log.

Any suggestions how to solve this ?

  1. after drag and drop we could call a 750 to release the cmd key alias commodore key.

@dirkwhoffmann is there a reset the complete keyboard method?

  1. we could intercept the JavaScript keydown/up and know whether it was intentional or the drag and drop thing?

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on June 6, 2024

is there a reset the complete keyboard method?

Sure there is 😎:

//! @brief    Clears the keyboard matrix.
void releaseAll() { for (unsigned i = 0; i < 8; i++) kbMatrixRow[i] = kbMatrixCol[i] = 0xFF; }

But how come the command key is pressed during drag and drop? 😳

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

But how come the command key is pressed during drag and drop? 😳

good question.... I have no idea yet ... But sure thing is, that it wasn't us 😬. Maybe macOS does this ? Can somebody with a windows machine look whether it shows the same 751,750,751 sequence when dragging a file into the drop zone ?

My setup: MacBook Pro, macOS 10.14.6, Firefox 76.0.1. (Had no time, yet to check on Chrome and Safari)

Also it has been reported only for firefox ... is it maybe the browser ?

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on June 6, 2024

Maybe macOS does this ?

I guess it's the browser, because it doesn't happen in VC64mac. Weird, though.

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

I just tried vc64web in iOS. It shows no key press in the log when selecting a file. But well ... it’s not a real drag and drop.

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

on my computer firefox 77.01 and safari 11 .. when dragging into the drop zone ... no cmd key in the log ...

vC64 message=MSG_IEC_BUS_BUSY, data=0
vC64 message=MSG_IEC_BUS_IDLE, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
vC64 message=MSG_SNAPSHOT_TAKEN, data=0
load file=Great_Giana_Sisters.d64 len=174848
isD64

@sy2002 how do you do this ? Do you maybe press CMD key + TAB to switch into the finder ? and after the OS did the app-switch the cmd release button is not reported to the browser anymore but to the finder ... sometimes πŸ™„ ... could be a race condition ? πŸ€”

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on June 6, 2024

What is the CMD key used for, btw? In VC64mac, it is never passed to the emulator because it is used for keyboard shortcuts (macOS does not even inform the keyboard handler about CMD+key presses because they are filtered out earlier).

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

But how come the command key is pressed during drag and drop? 😳

Confirmed... I got it now too ... just app switched with CMD+TAB a few times and you can expierence the lost cmd key release event ... well always .. no race condition.

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

What is the CMD key used for, btw?

well on mine is an apple key ... so I thought it would be clever to map it to the commodore key. πŸ’πŸ»

24B400FE-8296-41F9-A7C3-A4A4495669ED

maybe not so clever 😫

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on June 6, 2024

it would be clever to map it to the commodore key

Nice keyboard. I like the old style 😎.

Just don't map the CMD key (because of the reasons mentioned above) and we should be fine.

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

Just don't map the CMD key (because of the reasons mentioned above) and we should be fine.

you are right... lets remove it from the mapping ... so the native vc64 does not map the commodore key either ? I think I overestimated the importance of the commodore key ... after we remove it from the mapping the user is still able to press it with the HVK (handcrafted virtual keyboard) ..

Nice keyboard. I like the old style 😎.

key travel is one kilometer or miles don't remember exactly ... πŸ˜‚

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on June 6, 2024

so the native vc64 does not map the commodore key either ?

No, it doesn't. But there is a Commodore key on the Emoji bar of the newer MacBooks (officially called Touchbar, but most people use it for Emojis I think).

from virtualc64web.

mithrendal avatar mithrendal commented on June 6, 2024

pushed to gh-pages ... I think we can close this ? @sy2002 can we close it ?

from virtualc64web.

sy2002 avatar sy2002 commented on June 6, 2024

Thank you!
I did a retest one minute ago and tried 3 times: Was not able to reproduce the problem any more, so I closed this issue.

from virtualc64web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.