[Lazarus] How to detect that the Alt-key is released?

2015-08-02 Thread Jürgen Hestermann
According to http://wiki.lazarus.freepascal.org/LCL_Key_Handling the KeyUp event should be triggered when the Alt-key is released. But how do I tell this procedure that I want to check for the Alt-key? The key parameter is of type word. What is the representation of the Alt-key here? vk_alt does

Re: [Lazarus] How to detect that the Alt-key is released?

2015-08-02 Thread Jürgen Hestermann
Am 2015-08-02 um 14:33 schrieb JuuS: (btw. this WON'T work in onkeyup with just the alt key...when you lift alt (ie, keyup) it is no longer down and so is not in Shift, to see it work do something like alt-a). But that's just what I want: Detect the release of the Alt+key (independend from

Re: [Lazarus] How to detect that the Alt-key is released?

2015-08-02 Thread JuuS
Sorry I confused you, my specialty. What I meant was if you use the 'ssAlt in Shift' line, it won't work if you only press the alt key because in a keyup handler the key is then up! And so won't pass the if statement. It would work in a keydown handler though. if you press and hold alt and then

Re: [Lazarus] How to detect that the Alt-key is released?

2015-08-02 Thread JuuS
Hi, Shift keys are handled differently. When you to to the declaration of TShiftState you'll see: TShiftStateEnum = (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble, // Extra additions ssMeta, ssSuper, ssHyper, ssAltGr, ssCaps, ssNum,

[Lazarus] Fwd: Re: How to detect that the Alt-key is released?

2015-08-02 Thread Jürgen Hestermann
Am 2015-08-02 um 14:42 schrieb Jürgen Hestermann: Am 2015-08-02 um 14:33 schrieb JuuS: (btw. this WON'T work in onkeyup with just the alt key...when you lift alt (ie, keyup) it is no longer down and so is not in Shift, to see it work do something like alt-a). But that's just what I want:

[Lazarus] TEdit: Find character at caret position

2015-08-02 Thread Jürgen Hestermann
In a TEdit component, how do I find out which character is at the caret/cursor position? Or in other words: At which (string) position will the next typed character be inserted? I want to insert text at just that position myself but cannot find out where this (character) position would be.

Re: [Lazarus] TEdit: Find character at caret position

2015-08-02 Thread Howard Page-Clark
On 02/08/2015 18:33, Jürgen Hestermann wrote: In a TEdit component, how do I find out which character is at the caret/cursor position? Or in other words: At which (string) position will the next typed character be inserted? I want to insert text at just that position myself but cannot find out

Re: [Lazarus] Printing BitMap on OSX crashes

2015-08-02 Thread Martin Frb
On 02/08/2015 20:20, Martin Grajcar wrote: Maybe you can help me with this: How can I get the debugger (lazarus/gdb) show the C code? All I get for the innermost frames is an address and assembler. No idea what to install (and Google really didn't help). I dont know if that is possible at

Re: [Lazarus] Printing BitMap on OSX crashes

2015-08-02 Thread Martin Grajcar
Hi Jesus, On Sat, Aug 1, 2015 at 7:08 AM, Jesus Reyes A. jesus...@gmail.com wrote: The problem occurs because the bitmap is being freed before Printer.EndDoc. It is at this point that the bitmap data is used, but because it was already freed an AV occurs. I have actually fixed the problem,