WilliamKarolDiCioccio / open_local_ui

OpenLocalUI: Native desktop app for Windows, MacOS and Linux. Easily run Large Language Models locally, no complex setups required. Inspired by OpenWebUI's simplicity for LLM use.
MIT License
16 stars 2 forks source link

Add keyboard shortcuts #4

Open Rossi1337 opened 1 month ago

Rossi1337 commented 1 month ago

I just downloaded the 0.1release and really like it.

One thing that would help a lot would be a hotkey to "send message", maybe CTRL + ENTER or something similar. Currently I have to switch to the mouse when I have finished writing my prompt. This is the most annoying thing when using the UI. I would also propose to add a shortcut for the "New Chat" button, maybe CTRL + N. These two are the actions I would mostly do with the keyboard while I chat.

Another thing is that the UI does not scroll automatically to the bottom when new output is produced. This again forces me to switch to the mouse to manually scroll down to read the text.

Would be nice if I could do this with the UP and DOWN keys to scroll line by line or PAGE UP and PAGE DOWN keys to scroll a "page" up and down

Rossi1337 commented 1 month ago

Never mind I just have finished building from source. I see the shortcuts are already there.

WilliamKarolDiCioccio commented 1 month ago

No you were right. We actually need to say there are shortcuts maybe with KBDs (consider that in the future we'll have an onboarding screen to kickstart the user). Adding shortcuts for new chat and is also a good idea. Scrolling when the message is updated is something I'm working on but with the approaches I've tried so far it didn't always work. If you had a look at the chat provider file you've noticed it is quite a mess, in the future chat logic will be separated and providers generally reworked to avoid rebuilding entire pages for small changes so each time the chat message list will get an update the view will scroll (only if auto scroll is enabled by the user with a checkbox in the chat toolbar).

Really glad for your interest and appreciation, this is my first time collaborating on GitHub

Let me know if you have any other thoughts, I'll leave the issue opened and labeled as enhancement

Rossi1337 commented 1 month ago

A first simple solution would be to display them in the button tooltips. This is where I was looking for. Currently the tooltip is "Send message". So changing it to "Send message (SHIFT+ENTER)" will give the users already a good hint.

WilliamKarolDiCioccio commented 1 month ago

Hello! I'll leave a link to a solution I found reading an article that seems to be pretty valid. Have a look at it and let me know what you think

Rossi1337 commented 1 month ago

Yes that looks really cool. I think that will do the job. I wonder how this scales when you have more than a few hotkeys and maybe spread over multiple KeyboardWidget instances.

WilliamKarolDiCioccio commented 3 weeks ago

I'm almost done setting up a custom solution for this. We'll have an overlay at the bottom of the screen displaying shortcuts for the current context based on a widget key