我想在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. 滑動手勢滑動UIViews
- 3. 使用watchOS2.0在蘋果手錶中實施滑動手勢
- 4. 用手勢滑動視圖
- 5. UITextView滑動手勢
- 6. 用雙指滑動手勢
- 7. ListView中滑動手勢 - Android
- 8. Android - 使用滑動手勢的問題
- 9. 在Emacs Lisp中正確使用apply?
- 10. 在Swift中登錄後滑回手勢
- 11. 在Flash CS6中iOS的滑動手勢
- 12. UIButton和滑動手勢
- 13. 滑動手勢識別UIWebView
- 14. 滑動手勢給NSException
- 15. UIWebView覆蓋滑動手勢
- 16. UITextfield干擾滑動手勢
- 17. 如何在iOS中使用滑動手勢卷頁?
- 18. 添加滑動手勢,無法滑動
- 19. 如何使用滑動手勢平滑視差滾動
- 20. 如何使滑動手勢在Windows Phone平滑滾動/ XNA
- 21. 手機觸摸屏的滑動手勢
- 22. 如何使用Emacs Lisp在Emacs中添加日期?
- 23. 在Emacs Lisp中解析
- 24. 檢測用戶的手勢,如滑動
- 25. 用觸摸手勢滑動視圖
- 26. iPhone SDK 4.0中的滑動手勢?
- 27. 用滑動手勢關閉HamburgerMenu
- 28. Android滑動手勢不起作用
- 29. Emacs Lisp中的strpos
- 30. Emacs Lisp中的PPRINT?
什麼操作系統?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