Tutorial: how to customize your own mouse geastures?



  • More info on the gestures,too firstly,@shoust, thank you for your great efforts. here's his original posts: I've managed to edit the down gesture to open links in background. Simply swap the gesture from the COMMAND_NEW_TAB with the one in COMMAND_NEW_BACKGROUND_TAB , in defaultSettingsPlatformSpecific-bundle.js FWIW, I've figured out that the down gesture is 2, left gesture is 4, right gesture is 0, and up gesture is 60(Edit: 60 is Up-Right, current gesture for reopen closed tab, Gesture Up is actually 6, see more in my later post). More info on the gestures. 26 is Down-Up(the original open in background tab), 62 is Up-Down(reload), 20 is Down-Right. I'll edit this and see if I can add more gestures while tweaking. EDIT: Success! Added my own gesture to view source, Gesture 206 (translates to a U shape, Down(2)-Right(0)-Up(6)). Going by this I've figured out the mouse gestures and how they work. So Down=2,Left=4,Right=0,Up=6(60 is actually Up-Right). There's your gestures, each digit is a gesture, and combining the digits make up the combo gestures. Edit away! [b][color=#ff0000]AND[/color][/b] ,what I found is that you can not change some default gestures, such as close tab,reopen recently closed tab,and so on . So, what should we do? Is that complicated? The anser is NO. JUST 2 steps needed. step 1:open [color=#00ff00]bundle.js[/color],duplicate the commands you want and change its name,example:duplicate the COMMAND_TAB_REOPEN_RECENTLY_CLOSED,ie, [color=#ff0000]copy [/color]this one: {name:"COMMAND_TAB_REOPEN_RECENTLY_CLOSED",action:h.undoRecentlyClosedTab,label:b("Reopen Closed Tab1"),category:m.CATEGORY_COMMAND_TAB_ACTION}, and[color=#ff0000] paste[/color],change its name, as hilight , {name:"COMMAND_TAB_REOPEN_RECENTLY_CLOSED[color=#ff0000]_MY[/color]",action:h.undoRecentlyClosedTab,label:b("Reopen Closed Tab1"),category:m.CATEGORY_COMMAND_TAB_ACTION}, step 2:add gestures to your own commands at[color=#00ff00] defaultSettings-bundle.js[/color] example: COMMAND_TAB_REOPEN_RECENTLY_CLOSED[color=#ff0000]_MY[/color]:{gestures:[color=#ff0000]["04"],[/color]showInQC:!0}, where gestures:["04"] represents Right-Left Is that easy?



  • Lack of customizable mouse gestures (editing javascript files doesn't count) is the reason why I still use Firefox.

    What I want is this.

    left == previous (left) tab
    right == next (right) tab
    up == open new tab / open link in new tab
    down == open new background tab / open link in new background tab
    chord right then left == close current tab
    chord left then right == undo close tab
    hold right mouse button and scroll wheel == zoom image under mouse pointer in/out
    hold left mouse button and scroll wheel == zoom page in/out

    Until I can do this, I won't leave firefox and my beloved firegestures addon. But hey, that's just me!


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.