Git Product home page Git Product logo

Comments (9)

copy avatar copy commented on May 19, 2024

ALT+TAB cannot be captured by the browser. F5 can be captured, but is currently intentionally ignored – I didn't want to break browser functionality too much. I'll add a button for ALT+TAB and F5. And try to fix the WIN key.

from v86.

yogev1978 avatar yogev1978 commented on May 19, 2024

I would sincerely suggest that you rethink your approach regarding F5, and consider capturing it after all. For the last 10 years I have worked in several enterprise web software companies (for living, not related to KolibriOS), and ALL OF THEM have disabled F5 in browser while their software is used, since it would be very embarrassing to any user to fill some complex web form, and then get all his/her work lost due to pressing F5 by mistake. It happened to myself a few times even, and it was VERY annoying, to say the least.

from v86.

copy avatar copy commented on May 19, 2024

I'll send F5 to the emulator and block page refresh for now, unless someone complains.

from v86.

yogev1978 avatar yogev1978 commented on May 19, 2024

Thank you very much - I really appreciate that! I don't think many people will complain, since they always can use "Reset" button which essentially does the same as pressing F5.

from v86.

yogev1978 avatar yogev1978 commented on May 19, 2024

I have tested your changes right now on your website:

  • Disabling F5 key works great (behaves as expected)
  • WIN key now opens the "Start Menu" in the emulator, but it still opens the "Start Menu" in the host system (Windows) at the same time. So unfortunately it's still unusable (as host system "Start Menu" hides the emulator screen).
  • ALT+TAB works strange. It seems that pressing "Send ALT+TAB" button only sends the button press, but doesn't send button release. So the emulator thinks that ALT+TAB combination was never released.
Hope this test report is helpful for you!

from v86.

copy avatar copy commented on May 19, 2024

It doesn't seem to be possible to block the Start Menu in Windows – there's nothing I can do (except adding another button for it).

A release code is sent for alt-tab. Possibly there needs to be a delay between the keydown and keyup.

from v86.

yogev1978 avatar yogev1978 commented on May 19, 2024

Regarding ALT+TAB - I have 0 knowledge in JS, but I have taken a look at your code:
ps2.kbd_send_code(0x38); // alt
ps2.kbd_send_code(0x0F); // tab
ps2.kbd_send_code(0x38 | 0x80);
ps2.kbd_send_code(0x0F | 0x80);

There could be a few reasons why that code doesn't work:

  1. You send 2 scancodes (one for ALT, second for TAB). Some websites (although not all) mention that ALT+TAB pressed together has a single special scancode (different from scancodes for ALT or TAB pressed separately): 0xA5: http://www.freepascal.org/docs-html/rtl/keyboard/kbdscancode.html
  2. If websites mentioned in (1) are wrong, then the order for key_up should be reversed: first release TAB and then release ALT (like you do yourself when you work).

from v86.

copy avatar copy commented on May 19, 2024

The link in (1) is a different kind of scancode, I guess used in Pascal. For the record, PS2 scancodes can be found here: http://stanislavs.org/helppc/make_codes.html

(2) is makes sense, I'll change it to work that way.

from v86.

yogev1978 avatar yogev1978 commented on May 19, 2024

I have retested ALT+TAB again in KolibriOS, and it's working fine now, thank you!

from v86.

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.