Giter Site home page Giter Site logo

Alt+Tabbing Back Stops Replay about sdlpop HOT 4 CLOSED

nagyd avatar nagyd commented on July 20, 2024
Alt+Tabbing Back Stops Replay

from sdlpop.

Comments (4)

NagyD avatar NagyD commented on July 20, 2024 1

You said that the fix works, so I'm closing this.

from sdlpop.

NagyD avatar NagyD commented on July 20, 2024

Maybe SDLPoP should ignore the tab key for some time after its window gets focus?

from sdlpop.

EndeavourAccuracy avatar EndeavourAccuracy commented on July 20, 2024

I barely know the code, so this is just a shot in the dark, but can't it check whether event.type is SDL_KEYDOWN or something similar?

from sdlpop.

NagyD avatar NagyD commented on July 20, 2024

can't it check whether event.type is SDL_KEYDOWN or something similar?

The code is already doing that: Keyboard commands are read from the last_key_scancode variable, which is set only in SDL_KEYDOWN events.
See here: https://github.com/NagyD/SDLPoP/blob/master/src/seg009.c#L2867
(You can add a debug printout there to see what happens.)

The operating system (or SDL) automatically sends repeated keydown events if a key is held down.
For example, if I Alt+Tab into a text editor, then holding Tab down will enter tabs until I release it.
A difference between operating systems is that on Windows, there is a noticeable delay before the first repeat; but on Linux, there is no such delay.

from sdlpop.

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.