Switching between tabs with mouse4/5


#1

I wonder if I can switch between tabs using mouse 4/5? Thanks


#2

I don’t even know what those buttons are. :astonished:
I’ve never used more than two, plus the wheel although I don’t use it as a button either.


#3

On my gaming mouse (that obviously needs to be cleaned :laughing:), they’re here:


#4

Yeah same here, but they don’t work in Atom (does in Notepad++) and it was a really comfortable way to go through the files :stuck_out_tongue:


#5

Do they show up in the key resolver display?


#6

Where do I find that? I just started using atom 1 hour ago so I’m not sure


#7

ctrl-period shows the display.


#8

I think the keybinding resolver is just for KeyboardEvents. Anyway, they don’t show up there for me


#9

Duh. Yes…


#10

It’s just a json file there which is empty.


#11

Ctrl-. should give you a little view at the bottom, showing which key combination you just pressed:

But yea, won’t show you mouse clicks.

If nobody can think of a reason why it shouldn’t, I suppose a request ticket could be opened on the keybinding-resolver repo.


#12

Does something like this work? Put into your init script:

window.addEventListener 'click', (e) ->
	command = switch e.button
		when 3 then 'pane:show-previous-item'
		when 4 then 'pane:show-next-item'
		else null
	if command
		pane = atom.views.getView(atom.workspace.getActivePane())
		atom.commands.dispatch pane, command
		e.stopPropagation()
		e.preventDefault()

Can’t test because I’m using a trackpad :frowning: