Giter VIP home page Giter VIP logo

Comments (3)

adamjs avatar adamjs commented on June 14, 2024

Are you synthesizing the key presses yourself or translating them from an existing framework?

I would actually look at Sample 7, specifically where it takes GLFW keypress (WindowGLFW_key_callback) and GLFW char events (WindowGLFW_char_callback) and translates them into appropriate Ultralight events for guidance on using this API: https://github.com/ultralight-ux/Ultralight/blob/master/samples/Sample%207%20-%20OpenGL%20Integration/src/Window.cpp

from ultralight.

jeff8j avatar jeff8j commented on June 14, 2024

At the moment I am trying to synthesize the input to get it working, the end result will come from sdl
This is my keydown code I trigger it with the sdl keydown then trigger the up when releases
I have tried various keycode/scancode/text combos and cant get anything to work at all
I load a js key tester page to make sure its not my js https://keyjs.dev/ and it gets nothing as well

int keycode = 69; // 101;
int scancode = 8;
ULString keytext = ulCreateString("E");

ULKeyEvent evt = ulCreateKeyEvent(kKeyEventType_RawKeyDown, 0, keycode, scancode, keytext, keytext, false, false, false);
ulViewFireKeyEvent(view, evt);
ulDestroyKeyEvent(evt);

from ultralight.

jeff8j avatar jeff8j commented on June 14, 2024

I pulled out the relevant code from my program and made a small program that has the same problem
https://github.com/jeff8j/Ultralight-SDL-Key-Test/blob/main/main.cpp

from ultralight.

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.