Refactor keyboard shortcut callbacks as template function
Refactor signal callbacks as template function