Comments (6)
Thx a lot.
from hotkeylistener.
Hello Benno,
Great to hear! Yes, that's very possible actually. You can save the hotkey in string format, e.g. myHotkey.ToString()
, then upon retrieving it you can convert it into a Hotkey
object, e.g. Hotkey myHotkey = HotkeyListener.Convert(myHotkeyInStringForm)
and register it once the application starts.
Try this and let me know.
from hotkeylistener.
Hi,
Sorry if this comes here post-mortem, but I have an issue with this approach. I am currently doing exactly as suggested by you, @Willy-Kimura -- I have a string representation of the shortcut ("LWin, Alt + S
"), but when I try to make a HotKey
object out of it (via construction or via Hotkey myHotkey = HotkeyListener.Convert(myHotkeyInStringForm)
, I get a System.ArgumentException
with message "Der angeforderte Wert "LWinS" konnte nicht gefunden werden.
" (in english: "The value "LWinS" could not be found.
"). I don't know what to do about this... Is that even a proper string representation that I have there? I got it by creating the HotKey
object manually and printing it to terminal.
Any help would be appreciated.
from hotkeylistener.
No problem.
Looks like the hotkey is not including the +
delimiter after conversion. There may have been an update that resorts to this behaviour. Try reverting to the previous version 1.8.0
to confirm if it works then let me know.
from hotkeylistener.
@Willy-Kimura can you give an example of the code for saving in settings. This is what Im doing https://imgur.com/NvixXZM
and to save https://imgur.com/VZhcITc.
from hotkeylistener.
@Mike276alpha basically I meant you can literally save the hotkey in string format to a settings file, e.g.
File.WriteAllText("C:\my\settings\file.txt", hotkey1.ToString());
from hotkeylistener.
Related Issues (20)
- Selections don't work in Firefox Browser HOT 3
- WPF support for HotkeySelector HOT 1
- Question: Sending an hotkey stored class Hotkey to windows application HOT 1
- Creation of HotKey Class instance using a string only works if correct upper/lowercase is used HOT 1
- .net 5.0 support HOT 1
- Having trouble using hotkeys with a console app
- Strange behavior of Google Chrome HOT 2
- AccessViolationException on Windows 11 HOT 5
- KeyNotFoundException when hotkey is pressed twice and suspending HOT 1
- ScrollLock based combo's HOT 1
- Win32Exception thrown in even the most basic program
- How do I change hotkeys HOT 3
- key PageDown
- Win Key Exception
- Hotkey class does not handle equality operator with null value HOT 2
- Exception raised in UIAutomationClientsideProviders.dll (see GetTextFromAutomationElement) HOT 3
- Prevent RegisterHotKey from stopping the default key action? HOT 7
- Issues with single key hotkey HOT 3
- Compile Error in VS 2019 HOT 2
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 hotkeylistener.