Key bindings

Key BindingMeaningEquivalent command
F2Switch filter modefilter
F5Refresh the interfacelist
F6Move to parent frame in the backtraceup
Shift F6Move to child frame in the backtracedown
F7Detect and step into a method call or block on the current linestep
Shift F7Finish execution of the current frame and jump to the next line of the parent framestep-out
F8Move to the next linenext
F9, Ctrl+DContinue the execution of your program until exit, or stop at the next break pointcontinue

You can always customize the key bindings set by putting a simple setting in the configuration file. The list of natively supported key binding is defined in this file.

config.key_bindings = {
RubyJard::Keys::CTRL_N => 'jard filter switch',
RubyJard::Keys::META_L => 'list',
RubyJard::Keys::CTRL_F1 => 'up',
RubyJard::Keys::CTRL_SHIFT_F1 => 'down',
RubyJard::Keys::META_D => 'step',
RubyJard::Keys::META_O => 'step-out',
RubyJard::Keys::CTRL_META_N => 'next',
RubyJard::Keys::META_F1 => 'continue',
RubyJard::Keys::META_SHIFT_F1 => 'continue',
RubyJard::Keys::CTRL_C => 'interrupt'

Jard also supports non-traditional and machine-dependent key bindings. For example, to map the Ctrl+Home key combination to the next command, you first need to get the code sequences of this combination. Let's run the following ruby program inside your terminal, press Ctrl+Home, copy the output, then put it into the configuration file.

require 'io/console'
loop do
data = STDIN.read_nonblock(255)
exit if data == "\u0003"
print data.inspect
rescue IO::WaitReadable; sleep 0.1; end
Capture raw key sequences
Capture raw key sequences. Click to enlarge.

In my machine, the above program prints "\e[1;5H". My configuration to map Ctrl+Home to next command looks like this:

config.key_bindings = {
"\e[1;5H" => 'next'

If the above program doesn't print any output, it means the key combination is conflicted or already handled by some programs in your environment. Please pick another one.