Fork me on GitHub
#spacemacs
<
2020-04-29
>
mccraigmccraig12:04:01

anyone know how to disable trackpad zoom gestures in spacemacs on macos ? i keep triggering them accidentally and i never want them

mccraigmccraig12:04:58

hmm, looks like the gestures becomes the keypresses <magnify-down> or <magnify-up>

mccraigmccraig12:04:05

can't figure out how i turn those gesture names into something i can use with global-unset-key though

practicalli-johnny13:04:51

@mccraigmccraig I would have thought that mac trackpad gestures were configurable in macosx. Are they simply emulating specific key presses or are they a different key binding that is mapped in Spacemacs somewhere? Would command-log, SPC a L be useful to run as you are working. It shows the key binding and command in a side buffer?

mccraigmccraig13:04:07

i don't want to configure the trackpad zoom gestures in macos - i'm happy with them outside of emacs, i just don't ever want them to trigger in emacs... C-h k showed me the binding info though, i just can't figure out how to turn that into a global-unset-key call, 'cos i'm an emacs n00b 😬

practicalli-johnny13:04:56

Sorry, I assumed you could disable gestures for specific applications, or exclude applications. Sound like not. Rather than unset those, perhaps set them to a function that does not do anything or perhaps nil. Not entirely sure how to do that myself...

practicalli-johnny14:04:56

I am guessing something like this in the dotspacemacs/user-config might work

(defun practicalli-nothing ()
    (interactive))

  (define-key global-map (kbd "<magnify-down>") 'practicalli-nothing)
  (define-key global-map (kbd "<magnify-up>") 'practicalli-nothing)

mccraigmccraig14:04:09

yeah, it's all or nothing in the macos trackpad prefs

mccraigmccraig14:04:52

ah - i think you've just given me the answer - it's the kbd fn that i need to translate the binding description

practicalli-johnny14:04:05

I dont have a Mac, so cant test it for you, but <up> and <down> worked for the arrow keys

mccraigmccraig14:04:55

works a treat 🙂

practicalli-johnny14:04:36

woot !! I feel like an elisp god (at least for the next minute or two) 🙂

practicalli-johnny14:04:56

Something else I can add to my Spacemacs book

mccraigmccraig14:04:03

spurious zooms have been bugging me for ages, but i finally snapped today and decided i had to fix it

bananadance 4
jaide19:04:39

By chance does anyone know how to tell spacemacs to use pylint for python-mode flycheck?

jaide23:04:14

Turned out not to be that bad. Had to enable the linter with flycheck-disable, then point flylint-python-pylint-executable to the right python command. Works great!

👍 4
practicalli-johnny22:04:21

@mccraigmccraig for completeness, it seems that using nil is preferred over using an empty function (it does make more sense to me in hindsight)

(define-key global-map (kbd "<magnify-up>") nil)
(define-key global-map (kbd "<magnify-down>") nil)