How to fix mouse??

Help
mihaumihau
2011-06-30
2012-12-10
  • mihaumihau

    mihaumihau - 2011-06-30

    Sorry for my english.

    I've got a question. Can I fix cfg. file of mouse to control for example "rythmbox"

    With qwerty keypad (nokia E72) I've got a lot of options, but I don't know how can I merge(?) 2 files.

    I think I can do something like that.

    %
    % anyremote configuration file for mouse emulation
    %
    % STATUS stable
    % XTEST yes
    % SOUND no
    % ENV no
    GuiAppName=Mouse test
    GuiAppBinary=true
    GuiAppIcon=mouse.png
    GuiAppType=Example
    GuiAppProtocols=Server
    GuiAppDesc=Mouse emulation
    [Protocol]=Server
    % redefine joystick keys
    UP=Macro(5)
    DOWN=Macro(8)
    LEFT=Macro(4)
    RIGHT=Macro(6)
    FIRE=Macro(113)
    (Init)=Include($(CfgDir)/Utils/aliases-server.cfg);
    (Connect)=Make(mode,mouse);
    
    [Mode]=mouse
    Cancel=Exit
    Back=Set(text,close);\
        Macro(ALLIN1MENU);
    (EnterMode)=Set(icons,Mouse,0,default,1,play,2,play,3,play,4,left,5,up,6,right,7,play,8,down,9,play,*,question,0,minus,#,pause);\
        Set(skin,default,keypad_only);\
        Set(status,Mouse emulation);\
        Set(title,);\
        Make(var,AutoRepeat,by_value,true);\
        Macro(ALLIN1MENU);
    (ExitMode)=Make(var,AutoRepeat,by_value,false);
    113=Make(var,AutoRepeat,by_value,false);\
        Emulate(mouse,1);\
        Make(var,AutoRepeat,by_value,true);
    119=Make(var,AutoRepeat,by_value,false);\
        Emulate(mouse,2);\
        Make(var,AutoRepeat,by_value,true);
    3=Make(var,AutoRepeat,by_value,false);\
        Emulate(mouse,3);\
        Make(var,AutoRepeat,by_value,true);
    4=Emulate(mousermove,-10,0)
    5=Emulate(mousermove,0,-10)
    6=Emulate(mousermove,10,0)
    7=Make(var,AutoRepeat,by_value,false);\
        Emulate(mouse,4);\
        Make(var,AutoRepeat,by_value,true);
    8=Emulate(mousermove,0,10)
    9=Make(var,AutoRepeat,by_value,false);\
        Emulate(mouse,5);\
        Make(var,AutoRepeat,by_value,true);
    * *=Set(text,replace,Help,1 - Left Click\n2 - CenterClick\n3 - RightClick\n4 - Move Left\n5 - Move Up\n6 - Move Right\n7 - WheelUp\n8 - Move Down\n9 - WheelDown\n** - Help\n0 - Space\n# - Left DblClick);
    0=Make(var,AutoRepeat,by_value,false);\
        Emulate(key,space)\
        Make(var,AutoRepeat,by_value,true);
    #=Make(var,AutoRepeat,by_value,false);\
        Emulate(mousedblclick);\
        Make(var,AutoRepeat,by_value,true);
    [ModeEnd]
    %
    % anyremote configuration file for rhythmbox. (Server-mode)
    %
    % STATUS stable
    % XTEST no
    % SOUND app
    % ENV no
    GuiAppName=Rhythmbox
    GuiAppBinary=rhythmbox
    GuiAppRun=echo 'A=`ps -ef|grep rhythmbox|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
    GuiAppIcon=rhythmbox.png
    GuiAppType=Application
    GuiAppProtocols=Server
    GuiAppDesc=Rhythmbox - The music management application for GNOME
    [Protocol]=Server
    (Init)=Include($(CfgDir)/Utils/aliases-server.cfg);
    (Connect)=Make(mode,rhythmbox);
    RHYTHMBOX_SETTITLE=ExecAndSet(title,rhythmbox-client --print-playing);
    [Mode]=rhythmbox
    (EnterMode)=Exec(echo 'P=`ps -ef|grep rhythmbox|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then rhythmbox & fi' |bash -f -s);\
        Set(skin,default);\
        Set(icons,Rhythmbox,1,vol_down,2,mute,3,vol_up,4,rewind,5,play,6,forward,7,prev,8,stop,9,next,*,question,0,pause,#,no);\
        Macro(ALLIN1MENU);\
        Set(font,small);\
        Macro(DBUS_TEST_RHB,echo 'if [ "x$(Dbus)" == "xyes" ]; then echo 0; else echo 1; fi'|bash -f -s);
    DBUS_TEST_RHB=Make(mode,rhythmbox_dbus);
    
    Cancel=Exec(rhythmbox-client --quit);Timer(RHYTHMBOX_SETTITLE,cancel);Exit
    Back=Set(text,close);Macro(ALLIN1MENU)
    %1=Exec(python -c "import dbus;import sys;import os;session_bus = dbus.SessionBus();pp = session_bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player');player = dbus.Interface(pp, 'org.gnome.Rhythmbox.Player');player.setVolumeRelative(-.10)")
    %3=Exec(python -c "import dbus;import sys;import os;session_bus = dbus.SessionBus();pp = session_bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player');player = dbus.Interface(pp, 'org.gnome.Rhythmbox.Player');player.setVolumeRelative(.10)")
    1=Exec(rhythmbox-client --volume-down)
    2=Exec(echo 'M=`LANG=C;rhythmbox-client --print-volume|grep "muted"|wc -l`;if [ "x$M" == "x0" ]; then rhythmbox-client --mute; else rhythmbox-client --unmute; fi'|bash -f -s);
    3=Exec(rhythmbox-client --volume-up)
    4=Exec(python -c "import dbus;import sys;import os;session_bus = dbus.SessionBus();pp = session_bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player');player = dbus.Interface(pp, 'org.gnome.Rhythmbox.Player');ts=player.getElapsed()-10;player.setElapsed(ts)")
    5=Exec(rhythmbox-client --play-pause);Macro(RHYTHMBOX_SETTITLE);Timer(RHYTHMBOX_SETTITLE,5,0)
    6=Exec(python -c "import dbus;import sys;import os;session_bus = dbus.SessionBus();pp = session_bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player');player = dbus.Interface(pp, 'org.gnome.Rhythmbox.Player');ts=player.getElapsed()+10;player.setElapsed(ts)")
    7=Exec(rhythmbox-client --previous);Macro(RHYTHMBOX_SETTITLE);
    8=Exec(rhythmbox-client --play-pause)
    9=Exec(rhythmbox-client --next);Macro(RHYTHMBOX_SETTITLE);
    * *=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n4 Rew\n5 Play\n6 FF\n7 Prew\n8 Stop\n9 Next\n** Help\n0 Pause\n # Quit\n* # - Run/Quit)
    * #=Exec(echo 'P=`ps -ef|grep rhythmbox|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then rhythmbox & else rhythmbox-client --quit; fi' |bash -f -s)
    0=Exec(rhythmbox-client  --play-pause)
    #=Exec(rhythmbox-client --quit);Timer(RHYTHMBOX_SETTITLE,cancel);
    [ModeEnd]
    [Mode]=rhythmbox_dbus
    (EnterMode)=Dbus(connect,rb,org.gnome.Rhythmbox,/org/gnome/Rhythmbox/Player,org.gnome.Rhythmbox.Player);\
        Dbus(connect,rb2,org.gnome.Rhythmbox,/org/gnome/Rhythmbox/Shell,org.gnome.Rhythmbox.Shell);\
        Dbus(signal,rb,playingUriChanged,string,RHYTHMBOX_SETTITLE);
    
    Cancel=Exec(rhythmbox-client --quit);Exit
    Back=Set(text,close);Macro(ALLIN1MENU)
    1=Dbus(set,rb,setVolumeRelative,double,-0.1)
    2=Exec(echo 'M=`LANG=C;rhythmbox-client --print-volume|grep "muted"|wc -l`;if [ "x$M" == "x0" ]; then rhythmbox-client --mute; else rhythmbox-client --unmute; fi'|bash -f -s);
    3=Dbus(set,rb,setVolumeRelative,double,0.1)
    4=Dbus(get,rb,getElapsed,uint,elapsed);\
        Make(var,elapsed,echo "$(elapsed)-10"|bc);\
        Dbus(set,rb,setElapsed,uint,$(elapsed));
    5=Dbus(set,rb,playPause,bool,true);Macro(RHYTHMBOX_SETTITLE);
    6=Dbus(get,rb,getElapsed,uint,elapsed);\
        Make(var,elapsed,echo "$(elapsed)+10"|bc);\
        Dbus(set,rb,setElapsed,uint,$(elapsed));
    7=Dbus(set,rb,previous);Macro(RHYTHMBOX_SETTITLE);
    8=Dbus(set,rb,playPause,bool,true);
    9=Dbus(set,rb,next);Macro(RHYTHMBOX_SETTITLE);
    * *=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n4 Rew\n5 Play\n6 FF\n7 Prew\n8 Stop\n9 Next\n** Help\n0 Pause\n # Quit\n* # - Run/Quit)
    * #=Exec(echo 'P=`ps -ef|grep rhythmbox|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then rhythmbox & else rhythmbox-client --quit; fi' |bash -f -s)
    0=Dbus(set,rb,playPause,bool,true);
    #=Dbus(set,rb2,quit);
    [ModeEnd]
    [End]
    

    I'm not a programist. Once again I'm sorry for my english.

     
  • Mike

    Mike - 2011-07-07

    it looks ok )

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks