Giter Club home page Giter Club logo

navboard's People

Contributors

taaparthur avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

navboard's Issues

Default Keyboard Layout

The README states that the qwerty layout is the default:

`navboard` opens up the default OSK (standard qwerty layout)

When I run navboard without any arguments, I get the mobile_symb layout, not qwerty. The mobile_symb layout is also first in the list which doesn't seem like a coincidence:

sodco:~$ navboard -l
mobile_symb
mobile
number
qwerty
alarm
clock
colors
sliders
spawn
board_of_boards

Is this where it's happening?

const char*activeBoardName = args[i]? args[i] : getenv("NAVBOARD_DEFAULT")? getenv("NAVBOARD_DEFAULT"): NULL;

If I set NAVBOARD_DEFAULT=qwerty that works but I don't think that's what you meant in the README?

Clarify License

I am working on a pushing an Alpine package. Can you clarify the license to use for navboard? MIT?

Segmentation fault when font is not found

After the recent changes to the font search logic, a segmentation fault occurs if the font is not found:

sodco:~$ sudo mv /usr/share/fonts/liberation/LiberationMono-Regular.ttf .
sodco:~$ navboard qwerty
Segmentation fault

I was trying to test on my armv7 touchscreen device earlier and I couldn't figure out what was going on until I remembered I hadn't installed the fonts, which fixed it. Previously, a missing font resulted in a helpful warning and a graceful exit:

sodco:~$ navboard
Could not load font name /usr/share/fonts/TTF/LiberationMono-Regular.ttf

Adding Quit Key

Another question / request: what would be the best way to quit navboard in a touchscreen application? To me, having a quit key seems like the easiest solution but not many (any?) OSKs that I've tried include one.

I rebuilt navboard with the below patches and you can see the resulting quit key in the bottom right of the screenshot. It works well but using XK_0 seems wrong even though it doesn't appear to send the key before exiting.

--- ./functions.h.orig
+++ ./functions.h
@@ -24,5 +24,6 @@
 void setPressedFromCmd(KeyGroup*keyGroup, Key*key);
 
 void activateBoard(KeyGroup*keyGroup, Key*key);
+void exitNavboard(KeyGroup*keyGroup, Key*key);
 
 #endif

--- ./functions.c.orig
+++ ./functions.c
@@ -45,6 +45,10 @@
     activateBoardByName(key->arg.s ? key->arg.s: key->label);
 }
 
+void exitNavboard(KeyGroup*keyGroup, Key*key) {
+    exit(0);
+}
+
 void setKeyEnv(const Key* key) {
     char buffer[8];
     sprintf(buffer, "%d", key->value);

--- ./boards/qwerty.c.orig
+++ ./boards/qwerty.c
@@ -1,4 +1,5 @@
 #include "../navboard.h"
+#include "../functions.h"
 Key keys_qwerty[] = {
     {XK_grave},
     {XK_1},
@@ -63,6 +64,7 @@
     {XK_space, .weight = 5},
     {XK_Alt_R, .weight = 1},
     {XK_Control_R, .weight = 1},
+    {XK_0, .label="Quit", .onPress=exitNavboard},
 };
 
 REGISTER(qwerty, keys_qwerty);

navboard_exit

Build Issue on Alpine Linux

Hello, I successfully built both dtext-xcb and navboard on Alpine Linux. I've been looking for a simple OSK for a touchscreen car application and navboard seems great so far in my limited testing. I had a build error that I fixed with the below patch, though I'm not sure whether that's the best fix or not.

A question: what is meant by the "generic application launcher" part of the project description? Thanks!

--- ./xutil.c.orig
+++ ./xutil.c
@@ -191,7 +191,7 @@
             }
         }
     }
-    printf("Could not find %ld\n",targetSym);
+    printf("Could not find %ld\n",(long)targetSym);
     assert(0);
     return 0;
 }

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.