Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Saving and Loading KeyBindings

Hi, maybe I've  missed something in the Wiki or in this list, but I can't find it (and  I have looked):

TLMDEditKeybindingsDialog allows you to customise KeyBindings for LMD Syntax at runtime, but I can't find any way to save the customised bindings and load them at next application start. Is it possible to do this, please?

Thanks.

Comments

  • 4 Comments sorted by Votes Date Added
  • Posts: 0 Accepted Answer Vote Up0Vote Down
    There no built-in way to save/load them. Programmatically, you can access customized key bindings via View.CustomKeyBindings property.
  • OK, thanks, Eugene. Can I add it to the requested features list, please? Obviously I can write code to save and load them myself (and will do), but that's a technique that's always a bit risky with someone else's structures - if the internal format changes, or adds new properties, I'd have to rework my code.
  • The problem with cases like this, is that various of formats are exist. Including structured formats like registry, ini files, etc. So, we cannot provide a way to save/load in all of them for every case. On the other hand, saving to opaque binary stream seems to me inadequate.
  • That's a valid point, Eugene, but Delphi itself provides the ability to save components in either binary or text format - and you do save the custom key bindings to the form file.

    It's not important, anyway. If I decide allowing runtime change of key bindings is a useful feature, I'll roll my own save and load code.

    Thanks.
Sign In or Register to comment.