Comments (47)
20.3.8
- added experimental global keyboard shortcut support
- Meta + Shift + N will now create a new note
from qownnotes.
Great, thank you for testing @Maboroshy. It took a while to integrate that for all platforms and still needs a lot more work.
I hope it will be exposed to scripting.
Do you have any suggestions on how that should look like? (And I still need to look into the UX on how there will be settings for global shortcuts.)
from qownnotes.
Working great.
And I still need to look into the UX on how there will be settings for global shortcuts
Perhaps just in the keyboard shortucuts
from qownnotes.
Would be nice, I will research that. I fear that global shortcuts are an OS-thing...
from qownnotes.
You can have a look at this library: UGlobalHotkey.
I didn't tried it so far, when I will find time I can do it.
from qownnotes.
Sounds interesting, thank you!
Please keep me posted if you find the time to test it.
from qownnotes.
UGlobalHotkey uses QPlatformNativeInterface, that is currently private in Qt. So far I wasn't able to build QOwnNotes with UGlobalHotkey.
from qownnotes.
You can maybe try to add:
QT += gui-private
in your project file, and then just
#include <qpa/qplatformnativeinterface.h>
should work
But I'm not sure if it still works with current QT version.
from qownnotes.
I already did that and I had to install quite some packages to do so. But I still get a lot of errors.
Using private classes can break the app at any time with an unsupported platform or a Qt update. And it has a lot of dependencies.
from qownnotes.
There is some other library too.
I tried this one but I get an error with the connect function, will try to find out the problem later.
from qownnotes.
I found that one too, from what I could see it's the same issue with gui-private
.
from qownnotes.
I implemented a method working on windows, and I guess only there. I have no possibility to test it on any other OS. If you want I can make a pull request.
from qownnotes.
Yeah, I stumbled above that too. But again, it uses Windows API functions...
We need something that works on all operating systems. 😞
from qownnotes.
As far I have seen there are also functions for Linux and Mac OS. You just have to implement them all separately. As for windows I implemented it already, I can move on maybe on weekend and implement it for Linux. But for Mac OS I wouldn't have any possibility.
from qownnotes.
UGlobalHotkey
should theoretically do all that, but I haven't made out all the (non-Qt-) dependencies yet and fixed all error messages. And that would just be (Ubuntu) Linux. It has to build and work on all build systems (Travis, OBS, AUR, AppVeyor..) and platforms. :)
Any help is appreciated. 👍
from qownnotes.
And of course we would have to make the hotkey configurable.
from qownnotes.
If we come up with a solution that doesn't need gui-private
then even better...
from qownnotes.
I can understand your points.
Well but I don't see any other solution then making a own library.
I also tried UGlobalHotkey but it has do much broken dependencies.
from qownnotes.
When I have more time I will take a look into it.
from qownnotes.
QHotkey
I tested it on Windows, and Linux Mint it works flawlessly.
Maybe it's possible to implement it in QOwnNotes.
Can have a deeper look into it to a later point.
from qownnotes.
Nice find! Thank you!
Under Linux it needs the Qt X11 Extras library and some X11 and other header files, I wonder how that would work out on all the build systems. Under OS X it needs some additional headers too...
It would need cmake integration too...
from qownnotes.
Another possibility:
https://github.com/mitei/qglobalshortcut
from qownnotes.
Thank you for your find, @richarson. There is no macOS support yet...
from qownnotes.
It might be a nice consideration to have it built in, but perhaps users could use something like autohotkey and it launches a command with arguments to make a new note?
It should be possible in other OS or window managers to provide an easy guide (http://askubuntu.com/questions/90567/quickly-launch-any-app-in-kde-with-a-shortcut) or to have a template file that users could drag and drop.
As a bridge solution, this might help - users do not have an easy, global cross platform - but with a little work or a series of scripts provided by other users, they achieve the functionality they want.
from qownnotes.
I have some new thoughts on subject.
There was a Qt library project called libqxt that had QxtGlobalShortcut with desired functionality. This libqxt is abandoned now, but QxtGlobalShortcut part seems to be adaptable to modern Qt versions.
Looks like this ongoing project successfully uses it.
from qownnotes.
Hm, the header of the files says 2011 and I can't see evidence that it is working on all platforms...
from qownnotes.
For now I see the following points for Linux:
- It's hard for app to handle global shortcuts since it's window manager's job;
- It's possible to work directly with WM for that, but there's no library, that can do it on all platforms;
- User can easily assign a shell command to global shortcut, at least in KDE there's a GUI for that;
- QON doesn't have any command line interface, it has web socket interface;
So the only way to have global shortcuts in QON is using/writing "keys to web socket" or at least "shell command to web socket" translator. Not a straight-forward way really, but possible.
from qownnotes.
from qownnotes.
There is this project.
from qownnotes.
Then there really is something to play for you! :)
from qownnotes.
Me? No way! I don't yet understand, why choosing high level abstractions like web sockets and dbus over command line for something as simple as passing some data into the app. I'm a bash guy: shell, files and piping for all!
For now, if I really need to pass something to app, I'd use something like this. But I work with note files directly instead.
from qownnotes.
There now is a new release, could you please test it and report if it works for you?
from qownnotes.
Works on my Manjaro Linux. Very cool feature. I hope it will be exposed to scripting.
from qownnotes.
Maybe there should be a second column in the key shortcut settings for a global shortcut.
That way it would also work for scripting since scripting actions show up in the key shortcut settings.
That also looks like a minimal effort solution.
from qownnotes.
Maybe there should be a second column in the key shortcut settings for a global shortcut.
Perhaps just in the keyboard shortucuts
yes, I also thought about that. the shortcut settings library will need some tweaking tho..
from qownnotes.
If I press Meta+Shift+N and then press cancel button in "New note" dialog or just press ESC then QOwnNotes exit out of memory...
from qownnotes.
@UffeJakobsen, are you talking about the dialog you get when you use the The shortcut to create a new note asks for headline Checkbox? I have no issue with that dialog. Do you get the same issue when you use the in-application shortcut Ctrl + N
? In any way please create a new issue.
from qownnotes.
No such issue on my system.
from qownnotes.
issue #1668 created
from qownnotes.
20.3.9
- you can now also manage global keyboard shortcuts in the Shortcuts settings
- there you can set a global shortcut to every action of the main menu,
including custom scripting actions - you can also search for global shortcuts in the
Search for shortcut
line edit - by default there are no global shortcuts activated
- there you can set a global shortcut to every action of the main menu,
from qownnotes.
There now is a new release, could you please test it and report if it works for you?
from qownnotes.
Works for built-in and scripting actions. I had an issue with the meta key mapping. It's not recognized as a modifier properly. Maybe that's a KDE Plasma thing, the way it makes meta work as a "start menu" button.
Trying the scripting actions the global keys always switch focus to QON. Can it be optional? Maybe as an extra scripting action setting?
from qownnotes.
I had an issue with the meta key mapping. It's not recognized as a modifier properly. Maybe that's a KDE Plasma thing, the way it makes meta work as a "start menu" button.
Exactly, to my knowledge they tried to make a regular key out of it so they can trigger the start menu with it. I don't know if there is a way around this in plain Qt...
Trying the scripting actions the global keys always switch focus to QON. Can it be optional? Maybe as an extra scripting action setting?
Phew, it wouldn't be easy to make that optional. It's currently all in 6e62d7d#diff-585cfecf0ce15ac75be3038e77e65611R564-R577
from qownnotes.
If you want debate about a way make that possible please open another feature request, @Maboroshy
from qownnotes.
Well it works better now - that mean that the app does not shutdown once i hit escape.
The problem now is that i cannot use the meta in the global hotkeys.
Also an unhide/hide windows action to assign a hot key to is also missing
from qownnotes.
The problem now is that i cannot use the meta in the global hotkeys.
see above (I can't tell what you are using, you never filled out the issue template, like advised 😁)
Also an unhide/hide windows action to assign a hot key to is also missing
That's something for #1324
from qownnotes.
The problem now is that i cannot use the meta in the global hotkeys.
There actually es even a bug reported for this: https://bugreports.qt.io/browse/QTBUG-62102
from qownnotes.
Related Issues (20)
- [FEATURE] Show previous path in "note folder not found" error message HOT 7
- [BUG] Desktop icon not shown under Plasma 6 in Wayland (tested on NixOS) HOT 1
- [I] spaces aren't putting enough space after punctuation on mac arm64 HOT 2
- [I] can't follow [[wiki linked]] file links that have spaces HOT 1
- [FEATURE] ask about first line file rename when picking non default note folder HOT 3
- [FEATURE] Reload current note if current note was bookmarks note and a browser bookmark was added HOT 3
- [F] LaTex inline and block equations support HOT 4
- [EDITOR SCHEMA] VSCodium HOT 3
- [SUPPORT] Need help installing QOwnNotes HOT 5
- [BUG] Doesn't want to connect to Nextcloud HOT 4
- [FEATURE] "Preview only mode" - Make editor pane a panel that can be disabled HOT 3
- [FEATURE] QLineEdit clear button icon for dark-mode HOT 1
- Build in Windows, qt6*, realease or debug, gives "application error 0x000007b" HOT 1
- [FEATURE] VCS trackable configuration file separate from note history, window positions, etc. HOT 6
- [FEATURE] Edit Notes in a Second Window HOT 5
- [FEATURE] Create a todo from highlighted text HOT 3
- [FEATURE] Export .html with relative links to create an interlinked knowledge base HOT 7
- [BUG] Markdown hierarchy appearing wrong in navigation panel HOT 8
- [Q] My existing notes on NC are not visible after install HOT 6
- Problem copying text from the second window. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qownnotes.