Giter VIP home page Giter VIP logo

Comments (6)

BennoB666 avatar BennoB666 commented on May 25, 2024 1

Thx a lot.

from hotkeylistener.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

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.

NiRit100 avatar NiRit100 commented on May 25, 2024

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.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

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.

Mike276alpha avatar Mike276alpha commented on May 25, 2024

@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.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.