Context menu event


#1

First time contributor here.

I recently put up a new package for doing column/block selection in the same way that slickedit/codewright do. By this I mean that you use the right mouse button to select a block of text rather than the more standard alt+left click selection that is used in many other editors.

This works great under windows but in Linux it falls on its face. I was able to figure out that ContextMenu events are issued after a mouse down event on Linux, but after a mouse up event on Windows. Apparently this is a long standing bug in the Chromium world with little to no love from the developers. So I’m curious if there is a way to overcome this issue in Atom?

If I could change when the contextmenu event occurs that would be great, but ultimately if I could just schedule my own contextmenu event that would work as well.

Thanks


#2

You should mention your package name. Never miss a chance to advertise your work! (grin)

I’ll look it up.

Edit: I can’t even look it up now because atom.io is down.


#3

Hey I was able to get it to work! Turns out you can reissue the contextMenu event by using

atom.contextMenu.showForEvent(e)

btw the package is https://atom.io/packages/slickedit-select