I have “System Settings > Desktop & Dock > Ask to keep changes when closing documents = Off”, then I have opened an existing text file using TextEdit, made some changes, and pressed Command-W. A dialog window appears:
Do you want to save the changes made to the document "abc.txt"?
[Save]
[Revert changes]
[Cancel]
Is there a keyboard shortcut to press the “Revert changes” button without using mouse or trackpad?