Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

(re)move disconnect-button in mouse mode

Help
ali
2011-07-13
2012-12-10
  • ali
    ali
    2011-07-13

    Hi,
    I am using (g)anyremote 5.11.7 in to control Ubuntu through a
    Sony Ericsson J10i2 Elm mobile-device.

    The mouse-emulation is working fine so far.
    The only (more or less) minor problem is, that the the big button in the middle of the joystick is used to "disconnect" the service.It would be more handy, if this button could emulate the left mouse-button. Since the disconnect-button seems usefull as well, it could be move to a less prominent place.

    Now my question is how to to that :- ) or wich file needs to be edited. Are the "preset-buttons" (like connect/disconnect) cotrolled by  the .cfg-files?

    Thanks in advance
    Alikh

     
  • Mike
    Mike
    2011-07-14

    Yes, You need to modifiy the *cfg file You use.

    Firstly, run anyremote from console with an additional "-log" parameter.
    Press middle of the joystick and then inspect $HOME/.anyRemote/anyremote.log

    You need to search line like:
    - DBG - : parseCommand >+CKEV: 0,XXX<

    In this case XXX is the code for pressed button.

    Search it in the *cfg file and change action for it.

     
  • ali
    ali
    2011-07-15

    Hey,
    thanks for the reply!

    Well the key I was looking for was called "fire".
    This button is obviously predefined to connect/disconnect and therefore controlled / predefined by the menus somehow.
    Since on my phone (SE ELM) there are three possible positions for this button (left, middle(fire), right), I wanted to move it to the left without using the "fire-button" in the menu.

    But adding an item like "go" to the menu with the desired asignement "Emulate(mouse,1)" works for me as well as not assigning the key.
    I needet a menu anyway and it gives me the disconnect-button on the left, the fire-button in the middle and an exit-button on the right. 

    Maybe this is not very accurate, but maybe FYI, it now looks sth. like this:

    -- <snip> --

    =Server

    % redefine joystick keys
    UP=Emulate(mousermove,0,-10);
    DOWN=Emulate(mousermove,0,10);
    LEFT=Emulate(mousermove,-10,0);
    RIGHT=Emulate(mousermove,10,0);
    Go=Emulate(mouse,1);

    (Init)=Include($(CfgDir)/Utils/aliases-server.cfg);

    (Connect)=Set(menu, add, Go);Make(mode,mouse);

    =mouse

    -- <snap> --

    Optionally the button on the left can become a "menu" to reach other modes (smhow alike allinone; but in this case only vlc and audacious are needet)…

    -- <sinp> --

    Connect)=Set(menu, add, Go, Mouse, Video, MP3);Make(mode,mouse);

    Go=Emulate(mouse,1);
    Mouse=Make(mode,mouse);
    Video=Make(mode,Video);
    MP3=Make(mode,MP3);

    -- <snap> --

    Since I am not a developer I do not recomment to copy/use this code; but for me the topic is solved.
    So, thank you very much for your help and big hughs to those who share anyRemote at all.

    Alikh