Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Can't find what I setting in the plugin. #7

Closed
YIRU69 opened this issue Jun 5, 2022 · 21 comments
Closed

BUG: Can't find what I setting in the plugin. #7

YIRU69 opened this issue Jun 5, 2022 · 21 comments
Assignees

Comments

@YIRU69
Copy link

YIRU69 commented Jun 5, 2022

This is a very great plugin. It solve me a lot problem what I use too many hotkeys.
But I find a problem when I use it.
I can't find what I setting.
Look at the pic.

  1. setting !
    image

  2. Done
    image

I want to look what setting disappear. Example, LU Enter

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

Another problem.
When I setting ojx as hotkey. Look at the gif, I need to tap twice o.
1

@moolmanruan
Copy link
Owner

Thanks @YIRU69, will investigate and see what I can fix it.

@moolmanruan
Copy link
Owner

moolmanruan commented Jun 5, 2022

Hi @YIRU69, I can't reproduce the issue where none is shown for the command's hotkey sequence.
input
after-accept

As for the second issue you mentioned. If you set the sequence to be o, j, x the first time you press o it is consumed, since it matches the sequence. If you press o again the plugin sees that the press doesn't match a sequence anymore and the key is handled normally. This is how I intended the plugin to work. What is the behaviour you are expecting? Do you want the command to execute when o, j and x are pressed simultaneously?

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

@moolmanruan Thank you for your report. I want to use this plugin when I write something. If I have to start the plugin, I can't write as usual. As you can, When I type something, I have to type twice that it match a sequence.

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

@moolmanruan
1

@moolmanruan moolmanruan self-assigned this Jun 5, 2022
@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

I create a new obsidian vault. The issue where none is shown for the command's hotkey sequence disappear. Maybe It cause by other plugins.

@moolmanruan
Copy link
Owner

If I let the key presses through instead of consuming them when they match a sequence it will end up typing oj and then trigger the command when you press x.

@moolmanruan
Copy link
Owner

Thanks for checking. I don't have too many plugins installed. If you know what other plugin causes the bug to appear I can install it and investigate if it's something I can handle in this plugin.

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

如果我让按键通过而不是在它们与序列匹配时消耗它们,它将最终键入oj,然后在您按下时触发命令x

Yeah, this is what I want to get. I just want to let it work when I type ojx. And don't want to interfere with my normal use.

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

In the current pattern, it interferes with my matching characters, and in the pattern I want, it will work after I have entered the characters, and at the same time delete the characters I entered. It's like an IDE.

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

The issue where none is shown for the command's hotkey sequence. I find that my theme cause it like none. I use the Shimmering Focus theme.

@moolmanruan
Copy link
Owner

Alright, thanks. I'll see what I can do.

What IDE are you referring to?

@YIRU69
Copy link
Author

YIRU69 commented Jun 5, 2022

I usually use the plugin (https://github.com/artisticat1/obsidian-latex-suite). Like it work. When I type ojx on the note, it should delete the ojx on note at first, and then worked as hotkey.

@moolmanruan
Copy link
Owner

I've tested IntelliJ and there they just ignore chord sequences containing simple keys/letters. In Visual Studio Code they consume the key even on the second press.

@moolmanruan
Copy link
Owner

Hi @YIRU69, will have a look at this issue over the weekend.

@YIRU69
Copy link
Author

YIRU69 commented Jun 10, 2022

Thank you very much , I'm really looking forward to your ability to do this.

@moolmanruan
Copy link
Owner

moolmanruan commented Jun 12, 2022

Hi @YIRU69 , found and fixed the the issue with the shortcuts showing none. It is part of the 0.4.1 release. Applied the mod-empty class to the element unnecessarily.

@moolmanruan
Copy link
Owner

As for the not blocking the default actions for keys... I checked out the Latex package and that package is built on replacing certain text sequences. I don't think this is a hotkey mechanism, so I'm hesitant to make changes. (NOTE: This plugin will never remove text characters.)
Could you give and example of a command you want to trigger with your o, j, x shortcut so I can understand the use case better?

@YIRU69
Copy link
Author

YIRU69 commented Jun 12, 2022

Thank you @moolmanruan
I tried to use this as an example, and the effect I wanted to achieve was to complete the shortcut keys without affecting the input.
I think the main thing about using shortcuts is that it is convenient and fast, and this premise is that it does not affect your own normal work.
I thought carefully about my own request and found that the way I needed was that there were fewer shortcuts and that the shortcuts didn't interfere with my typing. I guess I should choose the less commonly used key as the first key of the shortcut, or if you have any suggestions to solve this problem.
shift and alt as the first hotkeys may be is good choose.

@moolmanruan
Copy link
Owner

moolmanruan commented Jun 13, 2022

Yeah, I think in most cases using chords with modifier keys is the best option, you can always follow it with normal keys. For example ctrl-o j x (I map my caps lock to control on Windows and command on Mac). I did recently support modifier only shortcuts, so you could also start the sequence with shift as you mentioned, eg. shift o j x.
It's tricky to use normal keys in shortcuts, that why vim uses different modes to distinguish between normal typing and commands.

Have a look at this plugin (https://github.com/anselmwang/obsidian-key-sequence-shortcut) as well, maybe it does what you need?

@YIRU69
Copy link
Author

YIRU69 commented Jun 13, 2022

Thanks for the advice, I'll try it out, now that I'm closed for this issue, thank you again for your patient reply.

@YIRU69 YIRU69 closed this as completed Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants