ctrlR static method

KeyBindings ctrlR({
  1. required void onPress(),
  2. String hintLabel = 'Ctrl+R',
  3. String hintDescription = 'reveal',
})

Creates Ctrl+R binding (commonly used for reveal/toggle modes).

Implementation

static KeyBindings ctrlR({
  required void Function() onPress,
  String hintLabel = 'Ctrl+R',
  String hintDescription = 'reveal',
}) {
  return KeyBindings([
    KeyBinding.single(
      KeyEventType.ctrlR,
      (event) {
        onPress();
        return KeyActionResult.handled;
      },
      hintLabel: hintLabel,
      hintDescription: hintDescription,
    ),
  ]);
}