Giter Site home page Giter Site logo

veikk-linux-driver-gui's Introduction

An official driver has been released by VEIKK.

This project should provide basic functionality for tablets but is no longer actively maintained. The original author is too busy with school/work.


VEIKK Linux Driver Configuration Tool

A graphical configuration tool to easily customize the module parameters for the VEIKK Linux Driver (v2.0) for VEIKK-brand drawing tablets.

image highlighting the v2 release


Note: You must run the configuration tool as root to be able to apply any changes.

Implemented options

This GUI allows you to customize the sysfs module parameters for the VEIKK Linux driver. The exact format and requirements of all parameters in sysfs is fully documented in the driver code. Currently, the following options are supported:

Screen mapping

Select a rectangular region of the screen to map. The mapped area of the screen may be set manually by typing in the values, or you may drag the mapped region out on the screen preview for convenience.

  • Screen width, height: automatically set (needed by driver to set screen map)
  • Screen map x, y: pixel coordinates of the top left of the mapped area of the screen
  • Screen map width, height: pixel dimensions of the mapped area of the screen (must be positive)
Orientation

Choose one of four tablet orientations. Select these in the dropdown.

  • Default
  • Rotated 90deg CCW
  • Flipped (rotated 180deg)
  • Rotated 90deg CW
Pressure mapping

Set the parameters for a cubic function mapping physical to transmitted pressure. The coefficients are for a 1x1 square, and upscaled to the tablet's resolution; i.e., if the input pressure (x-axis) ranges from [0, 1], this mapping maps takes the input pressure to an output pressure also in [0, 1]. These may be inputted manually or calculated automatically by dragging the control points on the pressure mapping graph. A list of default mappings is also provided in a dropdown for convenience.

  • a0, a1, a2, a3: Coefficients to the cubic mapping p_out=a0+a1*p_in+a2*p_in**2+a3*p_in**3

Compiling and executing the tool

To compile, make sure you have qmake installed on your system, with a Qt version (>=5.12). (For development, the Qt Creator IDE w/ Qt Designer is recommended; this should come bundled with Qt.) Run:

qmake && make all clean

This should generate the binary. Make sure to run it as root, or else you will not be able to edit the module parameters in sysfs.

sudo ./veikk-linux-driver-gui

Enjoy configuring your driver!


Development status

Currently, development is focused on the S640, but PR's are welcome. The developer only has an S640 at the moment and is unable to directly develop new features for other models, but open to feedback and questions at jonlamdev at gmail dot com.

Future features
  • More detailed warnings/feedback to user (e.g., when not launched with root privileges)
  • Ability to save/load configurations from files
  • Ability to apply module parameters on startup (currently they don't persist through a reboot cycle)
  • Button mapping and other configuration options
  • Device-unique configuration
  • Packaging for easier distribution

veikk-linux-driver-gui's People

Contributors

jlam55555 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

veikk-linux-driver-gui's Issues

Automatically set screen size incorrect for multiple monitors

In my case, I have 3 1080p monitors and 1 virtual screen, so my screen size should be 5760 x 1920, but the program incorrectly assumes 1920 x 1080 and doesn't allow them to be changed/edited. After setting my screen_size and screen_map manually, the tablet works as expected, so screen_size really does need to be set to the total size of the virtual screen.

I can probably take a look at this if I get some time but just wanted to get the issue out there in case it's a quick fix.

No Changes Apply

Was able to install the driver hassle free and built the interface in Qt Creator. Ran the interface in root...everything works. But there are no changes to the actual tablet. Is there something I could be missing?

Thanks!

Errors when using qmake

Am getting the following errors:

veikkconfig.cpp: In constructor ‘MainWindow::MainWindow(QWidget*)’:
veikkconfig.cpp:51:17: error: ‘QOverload’ was not declared in this scope
                 QOverload<double>::of(&QDoubleSpinBox::valueChanged),
                 ^
veikkconfig.cpp:51:27: error: expected primary-expression before ‘double’
                 QOverload<double>::of(&QDoubleSpinBox::valueChanged),
                           ^
veikkconfig.cpp:70:17: error: ‘QOverload’ was not declared in this scope
                 QOverload<int>::of(&QSpinBox::valueChanged),
                 ^
veikkconfig.cpp:70:27: error: expected primary-expression before ‘int’
                 QOverload<int>::of(&QSpinBox::valueChanged),
                           ^
veikkconfig.cpp:81:13: error: ‘QOverload’ was not declared in this scope
             QOverload<int>::of(&QComboBox::currentIndexChanged),
             ^

When I type in qmake -v I get this confusing answer:

QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu

I'm using Ubuntu 16.04 and I have a Veikk A15 Pro (I realize these drivers weren't written for this exact model, am just trying to see if I can install them at all.)

Mapping to window size - pen reads only edge of screen

I tried setting the window mapping on the gui, but it mapped the pen to the edge of the screen. I use two monitors so was trying to map it only to one monitor.
Now, I can't use the pen, as it slides along the edge of my right-most screen, and I can't get it to come off the edge.

Any ideas?

Question on pad scaling to monitor size.

First off thank you for making this driver! pleasantly surprised to find it.

Context

I bought the same pad Veikk s640 6"x4" so I could be sure this driver would work with it. I got it scaled to 1 of my 4 monitors so that it wouldnt leave the monitor I am using for taking notes in my research (which the restriction to 1 monitor worked great).

However, I realized that my hand writing on the 6"x4" pad was much larger on the 1680x1050 resolution monitor. It looked like I was writing in a 25 font size in Microsoft Word.

Question

So does that mean I would need to get a much larger pad (like an 8"x11") in order to get it to scale my hand writing to the monitor better? or is there a way to scale the pad translation to screen so I can write tightly on screen like I do on the pad?

I look forward to the advice or brainstorming!
Thank you for your time.

Installing under openSUSE Leap 15.1

Hello Jonathan and thank you for you great work.

I'm using openSUSE Leap 15.1 KDE on HP EliteBook 8570p with VEIKK a15Pro and I keep unsucceding in the installing of the driver.

Yesterday I managed to install it but only the part "qmake && make all clean". The second part of the install instructions "sudo ./veikk-linux-driver-gui" returns "sudo: ./veikk-linux-driver-gui: command not found". It was working in Krita and the presure sensing was recognized also. The wheel and the buttons were not working.

However today the tablet was not recognized by the system - only the wheel was working as scroll. The system sees it as a mouse.
I went through the known issues and did what was described for the "veikk-linux-driver" installation. But with all the options for both the driver's versions the result is the same - only the scroll is working.

This is the result of the install command:

qmake && make all clean
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o qpressurecurvescene.o qpressurecurvescene.cpp
qpressurecurvescene.cpp: In constructor ‘QPressureCurveScene::QPressureCurveScene()’:
qpressurecurvescene.cpp:18:50: error: ‘void QPressureCurvePoint::updatePressureCurve(qint16*)’ is protected within this context
connect(points[i], &QPressureCurvePoint::updatePressureCurve,
^~~~~~~~~~~~~~~~~~~
In file included from qpressurecurvescene.h:4:0,
from qpressurecurvescene.cpp:1:
qpressurecurvepoint.h:28:10: note: declared protected here
void updatePressureCurve(qint16 );
^~~~~~~~~~~~~~~~~~~
qpressurecurvescene.cpp:19:64: error: no matching function for call to ‘QPressureCurveScene::connect(QPressureCurvePoint
&, void (QPressureCurvePoint::)(qint16), QPressureCurveScene*, void (QPressureCurveScene::)(qint16))’
this, &QPressureCurveScene::updatePressureCurve);
^
In file included from /usr/include/QtGui/qgraphicsitem.h:46:0,
from /usr/include/QtGui/QGraphicsRectItem:1,
from qpressurecurvepoint.h:8,
from qpressurecurvescene.h:4,
from qpressurecurvescene.cpp:1:
/usr/include/QtCore/qobject.h:204:17: note: candidate: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
static bool connect(const QObject sender, const char signal,
^~~~~~~
/usr/include/QtCore/qobject.h:204:17: note: no known conversion for argument 2 from ‘void (QPressureCurvePoint::
)(qint16
) {aka void (QPressureCurvePoint::)(short int)}’ to ‘const char*’
/usr/include/QtCore/qobject.h:217:17: note: candidate: static bool QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType)
static bool connect(const QObject sender, const QMetaMethod &signal,
^~~~~~~
/usr/include/QtCore/qobject.h:217:17: note: no known conversion for argument 2 from ‘void (QPressureCurvePoint::
)(qint16*) {aka void (QPressureCurvePoint::)(short int)}’ to ‘const QMetaMethod&’
/usr/include/QtCore/qobject.h:337:13: note: candidate: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
inline bool QObject::connect(const QObject asender, const char asignal,
^~~~~~~
/usr/include/QtCore/qobject.h:337:13: note: no known conversion for argument 2 from ‘void (QPressureCurvePoint::
)(qint16
) {aka void (QPressureCurvePoint::)(short int)}’ to ‘const char*’
make: *** [Makefile:249: qpressurecurvescene.o] Error 1<

That error was missing yesterday. Today I have also an optical mouse pluged, which was missing yesterday.
As I understood openSUSE has incorporated the linux-headers in linux-glibc-devel, which I have installed.

the dmesg result is:

usb 1-1.6: new full-speed USB device number 6 using ehci-pci
[ 6.682863] usb 1-1.6: New USB device found, idVendor=2feb, idProduct=0006
[ 6.682866] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6.682867] usb 1-1.6: Product: A15PRO
[ 6.682868] usb 1-1.6: Manufacturer: VEIKK.INC
[ 6.682868] usb 1-1.6: SerialNumber: 0000001
[ 6.688776] usbcore: registered new interface driver usbhid
[ 6.688777] usbhid: USB HID core driver
[ 6.689276] input: VEIKK.INC A15PRO as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/0003:2FEB:0006.0001/input/input10
[ 6.689336] hid-generic 0003:2FEB:0006.0001: input,hidraw0: USB HID v1.00 Mouse [VEIKK.INC A15PRO] on usb-0000:00:1a.0-1.6/input0
[ 6.689437] input: VEIKK.INC A15PRO as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/0003:2FEB:0006.0002/input/input11
[ 6.747008] ata6: SATA link down (SStatus 0 SControl 300)
[ 6.748561] hid-generic 0003:2FEB:0006.0002: input,hidraw1: USB HID v1.00 Keyboard [VEIKK.INC A15PRO] on usb-0000:00:1a.0-1.6/input1
[ 6.748721] hid-generic 0003:2FEB:0006.0003: hiddev96,hidraw2: USB HID v1.00 Device [VEIKK.INC A15PRO] on usb-0000:00:1a.0-1.6/input2<

The only thing working of the tablet is the srcoll wheel nothing else, even the pen.

What am I missing in order to install the driver successfully?

Regards
Stan

Set screen map and size for multiple monitors in default config file

Hello, I have similar problem described in 2nd thread with A15. It works, but I use 3 monitors and tablet is not big enough to cover this size, so I need tablet only on first monitor only. I cannot change default screen width in weikk-gui app, there is only 1920 fixed. My real screen width is 3x bigger ie. 5760. I have to define Map as a 1/3 of 1920 now, ie. 640. I want to replace current default /etc/modprobe.d/veikk.conf, but veikk conf file generated by GUI app has different structure in comparison to original veikk.conf. Is there any way to change Screen width in GUI app and store this settings as a default for veikk after startup? (Ubuntu 20.04)

Original /etc/modprobe.d/veikk.conf :
options veikk screen_size=70780800 screen_map=303995723626577920 orientation=0 pressure_map=40531374456897536

New stored veikk.conf from veikk-gui :
[orientation]
orientation=0

[pressure_map]
a0=0
a1=1.95
a2=-2.38
a3=1.43

[screen_map]
height=1080
width=640
x=0
y=0

[screen_size]
height=1080
width=1920

Many thanks!

make: *** [veikk-linux-driver-gui] Error 1

I can't make file, it shows this error:
collect2: error: ld returned 1 exit status Makefile:164: recipe for target 'veikk-linux-driver-gui' failed make: *** [veikk-linux-driver-gui] Error 1

Unkown Module core gui widgets

When I tried to run qmake, I got this error.

Project ERROR: Unknown module(s) in QT: core gui widgets

So I check the version and got this -

QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu

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.