Closed rkimoakbioinformatics closed 3 weeks ago
Hi, there is a section on how to use scopes in the README
Thanks. It helped. One things is that I had to use enable_scope.call("scope_b".to_string());
instead of enable_scope("scope_b");
, for disable_scope
as well.
@rkimoakbioinformatics
Thanks. It helped. One things is that I had to use
enable_scope.call("scope_b".to_string());
instead ofenable_scope("scope_b");
, fordisable_scope
as well.
Thanks! Do you mind updating the README to reflect the correct calling convention for enable_scope
?
Hi, can you help me with using scopes? I made a similar code to the example, but can't make scopes to work. My code is below.
I created it by
cargo create-tauri-app --rc
(Tauri v2),cargo add leptos_hotkeys
, and editingapp.rs
. Detecting the space key works, but Enter key is not detected when I click "Scope A" text and press Enter, or any other way.Also, how should I use
use_hotkeys_ref
? In the example code, I see something likeuse_hotkeys_ref(ref, "space", scope) => fn)
. What are the roles ofref
andscope
? Does it mean "detect the space key in the referenced element, which is under the scope"?