Keyboard shortcut / hot-keys in ROOT aliases

Hello,
I wanted to know if there is a way to create keyboard shortcuts to root aliases.

For example, ROOT always loads the rootalias.C on startup, where I’ve defined a function called myfunction().

If I type in the ROOT command line “myfunction()” the function is correctly executed. But I wondered if there is a way to assign a keyboard shorcut (something like Ctrl-M) to this function, instead of typing the whole name of the function, in the same way as Ctrl-K deletes the current line, etc.

Otherwise, if it is possible to assign a command like “.m” to this “myfunction” in the same way that .q exits ROOT.

Or these changes are only possible before compiling the source?

Hi,

Sorry, we have no plans to implement that.

Cheers, Axel.

My original intent with this feature suggestion was to use it for clearing the screen. Now in ROOT master, CTRL-L has been implemented directly for clearing the terminal, thanks jalopez!! Capture CTRL+L in ROOT prompt to clear · Issue #10057 · root-project/root · GitHub

Related discussion: RootTalk: [ROOT] keyboard macros ala the GNU readline library

2 Likes