Inverse search from pdf-tools to auctex uses Ctrl-click on the pdf file to go to the corresponding part of latex file. Is it possible to also assign Alt-click to do inverse search? I am using ubuntu 18.04 (in case the OS is relevant).
To do this, you need to know the keymap used by
pdf-sync-minor-mode. Normally this will be something like
pdf-sync-minor-mode-map. You can find out by calling
C-h v, then using tab completion to get the full name. In this case, it is indeed
Now you can use the function
define-key to bind your new key to the map. This function takes three arguments: the keymap, the key, and the function. The syntax for binding a mouse click is
[M-mouse-1] for clicking with the Alt key pressed. So:
(eval-after-load 'pdf-sync '(define-key pdf-sync-minor-mode-map [M-mouse-1] 'pdf-sync-backward-search-mouse))
eval-after-load to make sure the code isn't run until after
pdf-sync is loaded.