Coder Social home page Coder Social logo

Comments (15)

lostallmymoney avatar lostallmymoney commented on June 25, 2024

Oh.. One is at press the other is at release. I guess that could be seen as a design.

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Ups I think I know what is happening, let me check...
No clue about the mouse showing 4 times though...

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Yep, I introduced a bug in the previous commit that caused most actions to be performed when the key was pressed and released.
It should be fixed now. Please let me know otherwise.
Sorry!

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

Could you add run2 (the bugged one) where it also runs at release for different applications ?
It actually can be useful lol

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Well you can put the run action twice! (remember you can have macros). Or just make "run" run the script twice with something like:
9-run=cat myScript.bash myScript.bash | bash
Keep in mind that I am just making this up, I do not know if this will actually work!

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

Yeah you can run the action twice but what is interesting is having the possibility to run it another time when you release the button with the time interval that you want. Also I'm not sure you fixed the bug i still have it on my side :/

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

I might make my own fork also if you don't mind

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

Also I'm not sure but I think adding spaces in the run='' doesn't work and they end up deleted ( example : sh /home/script.sh --> error no such file as sh/home/script.sh ) so I need to points it towards a .desktop that points to my .sh

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Well shit... It should definetly not run the "run" command on release, I do not know what is happening then... I do not have a naga mouse right now so I am testing with a keyboard, but the testing code is a little brittle so maybe I messed up somewhere.
Maybe this is related with your mouse showing up 4 times instead of 2? I'm clueless about that. It is curious the amount of different behaviors and things people get, so many details!

You are right about the press/release thing, had not thought about it that way... I can see that being useful, I'll keep it in mind.

Yes please do your fork that is what it is about. But if you find something interesting let me know!

About the spaces, have you put the command between quotes? I remember running scripts with "bash script.bash" without issues.

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

I fixed the space problem. You removed all the ' ' in the line even after =. I changed that.
Also I added run2 (press/release) and run3 (without setsid because i'm trying to fix an issue where running a script with notify-send doesn't send the notifications ( i think it has to do with the users )). Here's the file if you want to copy/paste just the fix :
naga.zip

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Yes you are right! Thank you!
Could you make a pull request? If you dont feel like it I'll just manually add the changes.

from naga_keypadmapper.

lostallmymoney avatar lostallmymoney commented on June 25, 2024

I changed many things but here's the patch

    string line, line1, token1;
    int pos;
    while (getline(in, line)) {

      pos = line.find('=');
      line1 = line.substr(0, pos); //line1 = numbers and stuff

      line.erase(0, pos+1); //line = command
      line1.erase(std::remove(line1.begin(), line1.end(), ' '), line1.end()); //Erase spaces

      if (line1[0] == '#') //Ignore comments
      continue;

      //Search option and argument
      pos = line1.find("-");
      token1 = line1.substr(0, pos);
      line1 = line1.substr(pos + 1);

      //Encode and store mapping
      pos = stoi(token1) - 1;

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

Ok thanks, I included it in the source, I put a comment with your name so you get credited somehow at least!
I borrowed a naga so I could test better. I fixed some issues with the toggle command as well and added your run2 command.
It should be all working correctly now. Let me know otherwise.

Thanks for your help!

from naga_keypadmapper.

swapsCAPS avatar swapsCAPS commented on June 25, 2024

w00t! Also fixed for me : )

Ubuntu Gnome 16.04
Naga Epic Chroma

Thanks!

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on June 25, 2024

I considered this fixed in 4204a48

from naga_keypadmapper.

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.