Comments (12)
What do you mean numbers still go through? You mean your keypresses trigger two actions?
from naga_keypadmapper.
See 2) in USAGE in README
In order to get rid of the original bindings it disables the keypad using xinput as follows:
$ xinput set-int-prop [id] "Device Enabled" 8 0
where [id] is the id number of the keypad returned by $ xinput.
Does not that get rid of the original bindings?
Also in step 4)
- You may have to also run
$ xinput set-button-map [id2] 1 2 3 4 5 6 7 11 10 8 9 13 14 15
where [id2] is the id number of the pointer device returned by xinput - in case of naga 2014 you also have to check which of those two has more than 7 numbers by typing xinput get-button-map [id2]. Although this seems to be unnecesary in some systems (i.e CentOS 7)
I cannot tell, but it seems naga 2014 has a special treatment. Be sure your issue is not related with this!
I am not sure where the "Invalid format 0" is coming from. It appears that the naga daemon is working normally. So it is probably coming from some of the xinput calls above naga in nagastart.sh, could you pinpoint which one? (By calling nagastart.sh with bash -x nagastart.sh i.e)
from naga_keypadmapper.
I've also got a modification to the code for ioctl to exclusively capture device input, since I was too lazy to do the xinput mods. This means no tweaking with device settings.
It's on my Linux install somewhere, I'll grab it when I next boot into it.
EDIT: Actually never mind, I came from your thread on reddit, the code you have here is a lot different to the source, not sure if you're still using ioctl anymore.
from naga_keypadmapper.
This is the output with -x... I can't really tell what's going on tbh.
http://pastebin.com/H0WM92Dc
As to what I mean, I mean that when I press 1, both the special function happens AND the program gets a "1" written into it
from naga_keypadmapper.
Try inserting the following before the while(1) loop in the run() function in file naga.cpp:
ioctl(side_btn_fd, EVIOCGRAB, 1);
ioctl(extra_btn_fd, EVIOCGRAB, 1);
Assuming this works, the application will gain exclusive control of the side key inputs until you exit it.
from naga_keypadmapper.
It does work, however seems like the application also gains control of the mouse itself, as I can't move it... And the Invalid format 0
persists, too
from naga_keypadmapper.
Alright, drop the second ioctl, and see what happens.
I have no idea about the invalid format 0 though but it seems to be 'working'.
from naga_keypadmapper.
That works! 🥇
from naga_keypadmapper.
Guess my mods on the original script still works on this app, I'll leave the 'Invalid format 0' to apocatarsis since I don't personally have a Naga, I use the Naga Hex v2.
from naga_keypadmapper.
Hey I like the ioctl magic, thats cool!! Thanks! I'll add it to the master when I have a little time to test it. Or open a new branch and do it yourself if you want!
From the pastebin I see the complaining line is:
$ xinput set-int-prop 15 16 'Device Enabled' 8 0
This is incorrect, there should be either 15 or 16, only one id. Thats why it fails.
nagastart.sh is detecting wrong the xinput id of your Naga side keyboard, it appears as it is showing twice, as grep gives back two lines. Something that I havent see in the two nagas I have been able to test this myself...
Could you post the output of $xinput please?? that way ill should be able to generalize the script.
Either way, if the ioctl lines by @TheGuardianWolf work as expected some of the xinput lines in nagastart could be dropped. This is starting to look less like a cluster of hacks!! super cool! thanks guys!
Lastly, @SuperCuber, if I am not mistaken, with the ioctl line, you can just drop the lines
NAGAID1=$(xinput | grep Naga | grep keyboard | cut -d= -f2 | cut -b1-2)
xinput set-int-prop $NAGAID1 "Device Enabled" 8 0
in your nagastart.sh and it should work without complaining.
from naga_keypadmapper.
I've been looking to write an extension for razer-cfg for my Naga Hex V2 since it's not supported, does the Naga not have razer-cfg support or such for the side keys as well?
from naga_keypadmapper.
Well I think that when I wrote this It didnt, It was more about the lights an such, not even DPI AFAIK. But I dont have much experience, I tried to install it whitout success and just gave up when I didnt see how to change the bindings.
On the other hand, the idea was so simple that I just wrote it, just look at the code, whitout boiler palte its like 10 lines of system calls to xdotool...
However I invite you to somehow merge this with razer-cfg if you feel like it.
from naga_keypadmapper.
Related Issues (20)
- You guys are gods HOT 2
- run= runs 2x the same thing somehow HOT 15
- Xinput not detecting naga 2014 on ubuntu 17.10 HOT 1
- Assigning a key to "Space" makes entire computer lag HOT 3
- unintended keystrokes recorded with xev on Ubuntu 17.10 HOT 1
- Syntax for Numpad HOT 1
- "No naga devices found or you don't have permission to access them." When run the nagastart.sh HOT 1
- Not executing the same key twice with delay HOT 1
- Naga Chroma can't map 2 top buttons (back and forward) HOT 2
- Support on Wayland ? HOT 2
- buttons 13 and 14 can't detect release HOT 2
- Buttons 13 and 14 still do their original actions HOT 5
- Naga, back forward buttons wont remap
- Input lag HOT 4
- Xinput not disabling default keypad input
- Getting Syntax Error HOT 1
- Remake HOT 1
- nagastart.sh aborts immediately after launching.
- Support for Razer Naga X HOT 1
- No naga devices found or you don't have permission to access them. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naga_keypadmapper.