How to change pdf-tools navigation keybindings? reddit / emacs ---------------------------------------------------------------------- OutOfCharm · 2022-11-05 08:03 Want to remap Scroll Up / Down by Page-full keybindings `space` `backspace` to `[` `]`. ---------------------------------------------------------------------- Charnia · 2022-11-05 09:43 `(define-key pdf-view-mode-map (kbd "]") 'pdf-view-next-page-command)` `(define-key pdf-view-mode-map (kbd "[") 'pdf-view-previous-page- command)` Note that this does not work in evil mode, you'll probably need something like `(evil-define-key 'normal pdf-view-mode-map (kbd "]") 'pdf-view-next- page-command) ;; not tested` ---------------------------------------------------------------------- OutOfCharm · 2022-11-05 10:01 That's great, but it remaps `n` and `p`. What about `space` and `backspace`, which will leave in a page with more hits. ---------------------------------------------------------------------- Bodertz · 2022-11-05 11:53 Find out what commands SPC and backspace are bound to and remap those commands to [ and ]. `C-h k SPC` `C-h k DEL` ---------------------------------------------------------------------- Charnia · 2022-11-05 12:03 I'm a bit confused, in the original question you wanted to scroll up and down a full page using `[` and `]` right? The `n` and `p` buttons are also bound to the same commands by default, independent of \[ or \]. SPC is bound to `pdf-view-scroll-up-or-next-page` by default, which scrolls or skips to the next page if at the bottom of the page. If you want to change space to always scroll a page, you can use `(define-key pdf-view-mode-map (kbd "SPC") 'pdf-view-next-page-command)`, or if you want \] to have the same functionality as space use `(define-key pdf- view-mode-map (kbd "]") 'pdf-view-scroll-up-or-next-page)` You can always check which keys are bound in a certain mode with `C-h m`, or check what a certain key does with `C-h k`. ---------------------------------------------------------------------- OutOfCharm · 2022-11-05 12:13 Sorry for such a confusion, I originally followed the command description of the pdf-tools on github. And also wanna thank you, for your concrete response! ---------------------------------------------------------------------- OutOfCharm · 2022-11-05 12:14 That's helpful. Thank you! ---------------------------------------------------------------------- Charnia · 2022-11-05 12:26 No problem! If you're stuck again let me know. I know Emacs is a bit much and confusing at the start, we've all been there :) ---------------------------------------------------------------------- Bodertz · 2022-11-05 12:32 Sure. The inverse of that is `C-h f ` to find out what keys if any are bound to that command.