2048: use mwheel-scroll-functions to set termux swipe keys

This commit is contained in:
MitchMarq42 2023-01-15 20:09:15 -09:00
parent 064330b84d
commit c0a1ff7be2

View File

@ -362,10 +362,10 @@ individually."
(local-set-key (kbd "j") '2048-shift-down)
(local-set-key (kbd "k") '2048-shift-up)
;; Swipe controls for termux
(local-set-key (kbd "<mouse-4>") '2048-shift-left)
(local-set-key (kbd "<mouse-5>") '2048-shift-right)
(local-set-key (kbd "<mouse-6>") '2048-shift-down)
(local-set-key (kbd "<mouse-7>") '2048-shift-up)
(setq-local 'mwheel-scroll-left-function '2048-shift-left)
(setq-local 'mwheel-scroll-right-function '2048-shift-right)
(setq-local 'mwheel-scroll-down-function '2048-shift-down)
(setq-local 'mwheel-scroll-up-function '2048-shift-up)
(2048-startup)
(setq font-lock-defaults '(2048-highlights)))