rio icon indicating copy to clipboard operation
rio copied to clipboard

Missing/moved `wa` library in 0.0.34 breaking keybindings

Open destructobeam opened this issue 1 year ago β€’ 4 comments

Hi. Keybindings that are working on macOS in 0.0.33 have broken in 0.0.34 (for example Command+Shift+[ and ]; binding manually in the config also doesn't work). Looks like this is due to the missing wa library, which I see from other issues you are migrating away from for 0.1.0.

Would it be possible to get a 0.0.35 release with that back (looks like nightly has it) in the meantime please?

Thanks!

destructobeam avatar Jan 30 '24 03:01 destructobeam

Hey there @destructobeam thanks for the issue!

Sorry about the delay have been working on #428 , couldn't reply much issues.

Hmm weird, I can't reproduce it, the command+shift+[ or ] does work for me in the 0.0.34. What's your configuration file?

raphamorim avatar Feb 13 '24 11:02 raphamorim

Thanks @raphamorim, I don't have any custom config for keybindings at the moment, as they are working by default in 0.0.33. I have tried both the following in 0.0.34 without success however (I just get the literal characters [ and ] typed in to the command line), on macOS 14.3:

[bindings]
keys = [
  { key = "[", with = "super + shift", action = "SelectPrevTab" },
  { key = "]", with = "super + shift", action = "SelectNextTab" }
]
[bindings]
keys = [
  { key = "{", with = "super", action = "SelectPrevTab" },
  { key = "}", with = "super", action = "SelectNextTab" }
]

destructobeam avatar Feb 15 '24 23:02 destructobeam

Also, just to be thorough, I tried the following in 0.0.34 as well with no luck:

[bindings]
keys = [
  { key = "[", with = "command + shift", action = "SelectPrevTab" },
  { key = "]", with = "command + shift", action = "SelectNextTab" }
]

destructobeam avatar Feb 16 '24 00:02 destructobeam

I don't mean to nag you or anything, I only just saw that there was a 0.0.35 release. Confirming the above is not working in 0.0.35 either.

destructobeam avatar Mar 06 '24 11:03 destructobeam

@destructobeam could you confirm if is working on v0.1.6?

raphamorim avatar Aug 13 '24 08:08 raphamorim

I've been using this combination since version v0.0.38 and it works fine in all versions. Your problem is that you use + for the combination, but you need to use |, as described in the documentation. Here is the working solution I use:


[bindings]
keys = [
    { key = "{", with = "super | shift", action = "SelectPrevTab" },
    { key = "}", with = "super | shift", action = "SelectNextTab" },
]

@raphamorim Perhaps rio should report errors in the config when it finds unknown symbols or words that are not reserved and refer to the documentation.

MrPandir avatar Aug 13 '24 09:08 MrPandir

[bindings] keys = [ { key = "{", with = "super | shift", action = "SelectPrevTab" }, { key = "}", with = "super | shift", action = "SelectNextTab" }, ]

Is it working on 0.1.6? This was supposed to stop working if the navigation is plain but if you are using tabs, you should be able to remove these lines and should keep working

raphamorim avatar Aug 13 '24 09:08 raphamorim

Regarding the error message i agree, it’s a good idea report invalid key bindings πŸ‘

raphamorim avatar Aug 13 '24 09:08 raphamorim

Is it working on 0.1.6?

Yes it works in 0.1.6

I wonder why this doesn't work by default and requires adding it to the config? Judging by the code, this should work by default. πŸ€” https://github.com/raphamorim/rio/blob/6f6011ee2aec6be36fcdf0e203608d327a90386e/frontends/rioterm/src/bindings/bindings_wa/mod.rs#L944-L945

MrPandir avatar Aug 13 '24 10:08 MrPandir

Yea, that's the weirdest thing. Before it was a bug that was computing only if was { or } unfortunately. This bug was introduce somewhere 0.0.33~0.0.34 and stayed in the source code a while. I made a fix for it only in 0.1.4, so technically you shouldn't need anymore { or } bindings. It is working for me without any extra stuff by default.

raphamorim avatar Aug 13 '24 10:08 raphamorim

Yea, that's the weirdest thing. Before it was a bug that was computing only if was { or } unfortunately. This bug was introduce somewhere 0.0.33~0.0.34 and stayed in the source code a while. I made a fix for it only in 0.1.4, so technically you shouldn't need anymore { or } bindings. It is working for me without any extra stuff by default.

Oh, yes, in 0.1.6 it works by default and does not require changing the config. Good job. ❀️

MrPandir avatar Aug 13 '24 10:08 MrPandir

@raphamorim Thanks, this is back to working without any binding config needed. πŸ‘

destructobeam avatar Aug 13 '24 22:08 destructobeam