rio icon indicating copy to clipboard operation
rio copied to clipboard

ctrl-shift-n opens new window and ctrl-shift-t opens new tab even when re-mapped

Open col-b opened this issue 5 months ago • 4 comments

I've remapped the keys like this:

[bindings]
keys = [
  { key = "h", with = "control | shift", action = "SplitRight" },
  { key = "n", with = "control | shift", action = "CreateTab" },
  { key = "t", with = "control | shift", action = "CreateWindow" },
  { key = "right", with = "shift", action = "SelectNextTab" },
  { key = "Left", with = "shift", action = "SelectPrevTab" },
  { key = "right", with = "shift | control", action = "MoveCurrentTabToNext" },
  { key = "left", with = "shift | control", action = "MoveCurrentTabToPrev" },
]

but even with this, it seems that a new window is still opened up when I press ctrl+shift+n, and also a new tab is opened. When I do ctrl+shift+t, I get a new tab and also I get a new tab. It seems like the override for these key combinations isn't actually "overriding" the default, but rather just adding actions to it. Maybe I'm doing something wrong?

current rio version: v0.2.22

col-b avatar Jul 18 '25 13:07 col-b

Just noticed that if I first bind the keys to "None" and then bind them to my action, that works. Updated config that seems to do the right thing:

[bindings]
keys = [
  # unmap defaults first
  { key = "n", with = "control | shift", action = "None" },
  { key = "t", with = "control | shift", action = "None" },

  # define bindings
  { key = "h", with = "control | shift", action = "SplitRight" },
  { key = "n", with = "control | shift", action = "CreateTab" },
  { key = "t", with = "control | shift", action = "CreateWindow" },
  { key = "right", with = "shift", action = "SelectNextTab" },
  { key = "left", with = "shift", action = "SelectPrevTab" },
  { key = "right", with = "shift | control", action = "MoveCurrentTabToNext" },
  { key = "left", with = "shift | control", action = "MoveCurrentTabToPrev" },
]

col-b avatar Jul 18 '25 14:07 col-b

Not sure if that's intended to be required so will leave the issue open for comment, but this is fixed for me. Thanks!

col-b avatar Jul 18 '25 14:07 col-b

Hey @col-b sorry late reply, yes that's a way to fix. I plan to fix before turn 0.3.x release 🙏

Will leave this issue open until it's fixed!

raphamorim avatar Jul 19 '25 17:07 raphamorim

i have following binding, somehow the move tab doenst work with f or b key with the same modifier which alt | control

why is it?

  # { key = "b", with = "alt | control", action = "None" },
  # { key = "f", with = "alt | control", action = "None" },
  # #these doesnt work with or without unbinding
  # { key = "b", with = "alt | control", action = "MoveCurrentTabToNext" },
  # { key = "f", with = "alt | control", action = "MoveCurrentTabToPrev" },
  #these works without unbinding
  { key = "right", with = "control | alt", action = "MoveCurrentTabToPrev" },
  { key = "left", with = "control | alt", action = "MoveCurrentTabToNext" },

umarahzamy avatar Sep 16 '25 03:09 umarahzamy