Coder Social home page Coder Social logo

Using keyboard letters about gromit-mpx HOT 5 CLOSED

bk138 avatar bk138 commented on May 22, 2024 2
Using keyboard letters

from gromit-mpx.

Comments (5)

bk138 avatar bk138 commented on May 22, 2024

Sure it is. Contributions are always welcome!

from gromit-mpx.

moozer avatar moozer commented on May 22, 2024

Ok, so I decided not to give up in advance ...
Looking through the code I find it readable even with my very rusty C skills.

You define the keys the config file reader parses. It is limited to button and modifiers (ctrl/alt/etc)

gromit-mpx/src/config.c

Lines 148 to 165 in 3f85689

g_scanner_scope_add_symbol (scanner, 0, "PEN", (gpointer) GROMIT_PEN);
g_scanner_scope_add_symbol (scanner, 0, "ERASER", (gpointer) GROMIT_ERASER);
g_scanner_scope_add_symbol (scanner, 0, "RECOLOR",(gpointer) GROMIT_RECOLOR);
g_scanner_scope_add_symbol (scanner, 1, "BUTTON1", (gpointer) 1);
g_scanner_scope_add_symbol (scanner, 1, "BUTTON2", (gpointer) 2);
g_scanner_scope_add_symbol (scanner, 1, "BUTTON3", (gpointer) 3);
g_scanner_scope_add_symbol (scanner, 1, "BUTTON4", (gpointer) 4);
g_scanner_scope_add_symbol (scanner, 1, "BUTTON5", (gpointer) 5);
g_scanner_scope_add_symbol (scanner, 1, "SHIFT", (gpointer) 11);
g_scanner_scope_add_symbol (scanner, 1, "CONTROL", (gpointer) 12);
g_scanner_scope_add_symbol (scanner, 1, "META", (gpointer) 13);
g_scanner_scope_add_symbol (scanner, 1, "ALT", (gpointer) 13);
g_scanner_scope_add_symbol (scanner, 2, "size", (gpointer) 1);
g_scanner_scope_add_symbol (scanner, 2, "color", (gpointer) 2);
g_scanner_scope_add_symbol (scanner, 2, "arrowsize", (gpointer) 3);
g_scanner_scope_add_symbol (scanner, 2, "minsize", (gpointer) 4);

In order to expand to the entire keyboard, we would need to define all keys on the keyboard.

And then in the code, start looking somewhere around here

if (gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD && gdk_device_get_n_axes(device) >= 2)

from gromit-mpx.

bk138 avatar bk138 commented on May 22, 2024

General update: issues with Gromit-MPX can now be funded at https://issuehunt.io/r/bk138/gromit-mpx

from gromit-mpx.

bk138 avatar bk138 commented on May 22, 2024

@moozer Do you want e.g. 'b' to select a specific tool or act as an additional modifier to Alt,Shift,Ctrl?

from gromit-mpx.

bk138 avatar bk138 commented on May 22, 2024

Tentatively closing as there's requested info missing. Feel free to re-open if there's news.

from gromit-mpx.

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.