Sunday, April 28, 2024
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 18231  / 3 Years ago, wed, november 10, 2021, 8:27:20

Is there a way to set Emacs-like keyboard shortcuts (at least the subset mentioned below) for the whole OS? This is possible in some apps such as the terminal, Emacs (go figure :) and additionally through special plugins in some other apps (Eclipse), but I got so used to C-f-ing through text and never having to jump to arrows that I'd like to be able to do this system-wide so that I can do it whenever I'm typing - e.g. searching for songs in Rhythmbox, typing stuff into the dash or the HUD, writing mails in Thunderbird or Gmail... The combos I'm most interested in are:




  • C-f - forward

  • C-b - backwards

  • C-a - home

  • C-e - end

  • C-d - delete

  • C-k - delete line



(note for non-emacs users - C means Ctrl)


More From » shortcut-keys

 Answers
5

I managed to solve the problem by using AutoKey, as recommended in this answer. Some of my phrases are:



content                     |   hotkey             |   description
---------------------------------------------------------------
<ctrl>+f | <ctrl>+<alt>+f | replace the find operation
<home> | <ctrl>+a | begining of line
<end> | <ctrl>+e | end of line
<left> | <ctrl>+b | back one letter
<right> | <ctrl>+f | forward one letter
<delete> | <ctrl>+d | delete one letter
<home><shift>+<end><delete> | <ctrl>+k | kill line


(yeah, the kill line combo was nasty to find :)



You could go on replacing stuff, but I don't want the mental remap to grow to large (e.g. ctrl+n doesn't open a new window, but goes to next line). All in all AutoKey is a cool app!



Anyway, now I've got the emacs ergonomy of never having to leave the "letter keys" throughout Ubuntu - in every text box I am editing. Yeiii!



Update: as I got deeper into playing with AutoKey to fine-tune everything, I made quite some changes. You can see my complete AutoKey Ubuntu-Emacs configuration (and install it) in my dotfiles git repo.


[#33098] Friday, November 12, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uccase

Total Points: 473
Total Questions: 100
Total Answers: 110

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
;