As far as I can tell, there is no way to set a value for "all keys" in .inputrc
. But realistically, that's not really required in your use case; there are only so many keys you can hit by accident.
Personally, I've been using an .inputrc
originally derived from some very old SUSE release, but it has continued to work perfectly, even after copying it over to various other installs and distros. This file has explicit "nothing" mappings for function keys that are not currently used by readline:
# # Function keys F1 - F12 # $if term=linux # # On console the first five function keys # "\e[[A": prefix-meta "\e[[B": undo "\e[[C": "" "\e[[D": kill-line "\e[[E": "" $else # # The first five standard function keys # "\e[11~": prefix-meta "\e[12~": undo "\e[13~": "" "\e[14~": kill-line "\e[15~": "" $endif "\e[17~": "" "\e[18~": "" "\e[19~": "" "\e[20~": "" "\e[21~": "" # Note: F11, F12 are identical with Shift_F1 and Shift_F2 "\e[23~": "" "\e[24~": ""
where \e[17~
corresponds to F6, and so on.
Mapping the unused function keys to ""
should prevent the beep and the tilde, no matter which desktop environment you're using. I think your best bet is to identify the keys you tend to hit accidentally and assign them to ""
in your .inputrc
.
You can disable the terminal bell with set bell-style none
, also in your .inputrc
.