Skip to main content
3 of 7
Better usage of the wiki syntax
Sigma
  • 4.5k
  • 23
  • 27

Keypress/Depress Actions

I would like to create a function that does a "quick view" of a file the is under point in dired.

The way that I would like for this to work is that I hold down a function key, which then makes the file visible in a buffer, but when I let off of the key, the buffer closes and the dired buffer returns. I do not want to have to close the temporary buffer with C-x k.

Is there a way to make this functionality in Emacs? It seems possible if I can bind functions to keypress / depress.

Eric Brown
  • 3.2k
  • 4
  • 18
  • 20