Better implementation of Ctrl+G shortcut