I've replaced doc-view mode with pdf-tools.

While it's easy to set a mark on a page with the mouse, how do you do it with the keyboard?

The readme mentions the feature. "* Mark a region and kill the text from the PDF."

The closest I've gotten is marking the whole page with M-x pdf-view-mark-whole-page.

  • 2
    You can search the source code, you will find some keybinding definition. Like: (define-key map [down-mouse-1] 'pdf-view-mouse-set-region), and (define-key map [M-down-mouse-1] 'pdf-view-mouse-set-region-rectangle), and (define-key map [C-down-mouse-1] 'pdf-view-mouse-extend-region), (when (eq (car e) 'drag-mouse-1) etc. You can bind them to custom keybindings for yourself. Jul 4, 2015 at 23:17

1 Answer 1


That would require some notion of a cursor, which is currently not implemented. So marking by keyboard is not available (except the whole page).

  • How do you select the whole page?
    – xuhdev
    Apr 16, 2016 at 3:46
  • 1
    I see, pdf-view-mark-whole-page
    – xuhdev
    Apr 16, 2016 at 3:50
  • 1
    It can be achieved using avy. The file pdf-avy-highlight.el that can be found here uses avy to provide highlighting via the keyboard in pdf-tools. Oct 7, 2020 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.