mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
Add Support for Right and Middle Mouse buttons
This commit is contained in:
parent
751237cc8f
commit
a39cc580cf
@ -19,6 +19,30 @@ extension NvimView {
|
|||||||
self.mouse(event: event, vimName: "LeftDrag")
|
self.mouse(event: event, vimName: "LeftDrag")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override public func rightMouseDown(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "RightMouse")
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func rightMouseUp(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "RightRelease")
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func rightMouseDragged(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "RightDrag")
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func otherMouseUp(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "MiddleMouse")
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func otherMouseDown(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "MiddleRelease")
|
||||||
|
}
|
||||||
|
|
||||||
|
override public func otherMouseDragged(with event: NSEvent) {
|
||||||
|
self.mouse(event: event, vimName: "MiddleDrag")
|
||||||
|
}
|
||||||
|
|
||||||
override public func scrollWheel(with event: NSEvent) {
|
override public func scrollWheel(with event: NSEvent) {
|
||||||
let (deltaX, deltaY) = (event.scrollingDeltaX, event.scrollingDeltaY)
|
let (deltaX, deltaY) = (event.scrollingDeltaX, event.scrollingDeltaY)
|
||||||
if deltaX == 0, deltaY == 0 { return }
|
if deltaX == 0, deltaY == 0 { return }
|
||||||
|
Loading…
Reference in New Issue
Block a user