我想在emacs中使用两个手指侧滑手势。对于向上和向下滑动,它们被绑定到[mouse-4]
和[mouse-5]
。是否有另一个绑定为两个手指侧滑动?如果没有,是否有任何事件在two finger mouse
运动中触发?谢谢。在emacs lisp中使用侧滑手势
3
A
回答
2
我认为这是可能的,但我不认为Emacs默认了解触摸板的任何信息。你刷卡上下车时看到的事件是鼠标滚轮上/下事件:
`(wheel-up POSITION)'
`(wheel-down POSITION)'
These kinds of event are generated by moving a mouse wheel. Their
usual meaning is a kind of scroll or zoom.
The element POSITION is a list describing the position of the
event, in the same format as used in a mouse-click event (*note
Click Events::).
This kind of event is generated only on some kinds of systems. On
some systems, `mouse-4' and `mouse-5' are used instead. For
portable code, use the variables `mouse-wheel-up-event' and
`mouse-wheel-down-event' defined in `mwheel.el' to determine what
event types to expect for the mouse wheel.
M-:(info "(elisp) Misc Events")
RET
+0
FWIW,我并不期待这个答案被接受;我只是想澄清你实际看到的。我认为如何以Emacs的形式发送触摸板事件是一个很好的选择(虽然可能有一个具有各种操作系统特定的解决方案),而且我没有回答这个问题,这应该可能仍然开放。 – phils 2012-04-06 12:24:13
2
这听起来像你问mouse gestures
,或多或少。如果是这样,那么答案是肯定的。 Emacs支持鼠标手势:库strokes.el
和次要模式strokes-mode
就是这样。以下是文档字符串:
切换笔划模式,全局次要模式。 使用前缀参数ARG,如果ARG为 为正值,则启用Strokes模式,否则将其禁用。如果从Lisp调用,则在缺省ARG或零时启用 模式。
Strokes are pictographic mouse gestures which invoke commands.
Strokes are invoked with S-down-mouse-2. You can define
new strokes with M-x strokes-global-set-stroke. See also
M-down-mouse-2 for `complex' strokes.
To use strokes for pictographic editing, such as Chinese/Japanese, use
M-x strokes-compose-complex-stroke, which draws strokes and inserts them.
Encode/decode your strokes with M-x strokes-encode-buffer,
M-x strokes-decode-buffer.
key binding
--- -------
<M-down-mouse-2> strokes-do-complex-stroke
<S-down-mouse-2> strokes-do-stroke
0
这就是我在OSX 10.6.8上上下滚动的方式。
(global-set-key [(wheel)] 'mwheel-scroll) ;; magic mouse track-pad
相关问题
- 1. Android - 滑动左侧|右侧。手势检测
- 2. 平移手势和滑动手势
- 3. 滑动手势滑动UIViews
- 4. 使用watchOS2.0在苹果手表中实施滑动手势
- 5. 用手势滑动视图
- 6. SlidingMenu:禁用滑动手势
- 7. UITextView滑动手势
- 8. 滑动ios手势
- 9. 用手势滑动动画
- 10. 用双指滑动手势
- 11. 左手手势滑过UITextField
- 12. ListView中滑动手势 - Android
- 13. 使用javascript检测滑动手势
- 14. Android - 使用滑动手势的问题
- 15. 在Emacs Lisp中正确使用apply?
- 16. Android:使用滑动手势在另一个滑动的活动
- 17. 禁用xcode 4中的滑动手势
- 18. 在UITableViewCell中滑动手势UIImageView
- 19. 在Android中的手势滑动
- 20. 在Flash CS6中iOS的滑动手势
- 21. 在Swift中登录后滑回手势
- 22. 在应用程序中使用的滑动手势
- 23. UIButton和滑动手势
- 24. 使用自定义导航控制器时启用回手势滑动手势
- 25. 滑动手势识别UIWebView
- 26. 滑动手势给NSException
- 27. UIWebView覆盖滑动手势
- 28. 滑动手势不工作
- 29. UITextfield干扰滑动手势
- 30. AS3:滑动手势速度
什么操作系统?zzzzzzzz – 2012-04-05 11:42:30
osx.zzzzzzzzzzzzzzzz – Doboy 2012-04-05 18:20:31
你如何让您的Emacs?你使用的是什么版本的Emacs?你对Unix构建工具链感到满意吗? – 2012-04-06 01:26:04