Giter Club home page Giter Club logo

mousemode's People

Contributors

randoragon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mousemode's Issues

[Solved] Rouge-like configuration

Hey! just wanted to say thanks, this is straightforward and awesome piece of code. Yesterday when I was going for dissertation defense review milk container spill, ruining my touchpad - again hearty thanks for this I was able to successfully finish it up today, little nuisance in the beginning but I was able to create a configuration that suited - thought I will share here if someone's interested, it should come very handy for people who are similar with rouge-like games.

    /* 
     *     rouge-like    scroll       Speed          
     *      y  k  u        o     
     *       \ | /         |       (c)...(f)aster
     *    h --   -- l      |                               
     *       / | \         |         (q)uit                              
     *     b   j  n        e                                       
     */
    isleft    = (iskeydown(XK_h)) || (iskeydown(XK_y)) ||  (iskeydown(XK_b))?  1 : 0;
    isdown    = (iskeydown(XK_j)) || (iskeydown(XK_n)) ||  (iskeydown(XK_b))?  1 : 0;
    isup      = (iskeydown(XK_k)) || (iskeydown(XK_y)) ||  (iskeydown(XK_u))?  1 : 0;
    isright   = (iskeydown(XK_l)) || (iskeydown(XK_u)) ||  (iskeydown(XK_n))?  1 : 0;
   

    ism1      = iskeydown(XK_a); /* left click   */
    ism2      = iskeydown(XK_s); /* middle click */
    ism3      = iskeydown(XK_d); /* right click  */
    ism4      = iskeydown(XK_o); /* up   scroll  */
    ism5      = iskeydown(XK_e); /* down scroll  */

and

  root = RootWindow(dpy, DefaultScreen(dpy));
    {
        grabkey(XK_q);                               /* quit    */
        grabkey(XK_a); grabkey(XK_s); grabkey(XK_d); /* mouse   */ 
        grabkey(XK_e); grabkey(XK_o);                /* scrolls */
        grabkey(XK_f); grabkey(XK_c);                /* speed   */
        grabkey(XK_h); grabkey(XK_j); grabkey(XK_k); grabkey(XK_l); /* vim-only */
        grabkey(XK_y); grabkey(XK_u); grabkey(XK_b); grabkey(XK_n); /* rouge-like */
    }

Again thanks for keeping codebase clean! cheers and have a great day

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.