Recent

Author Topic: Problemas con el evento "OnKeyDown"  (Read 6810 times)

hexxa

  • New Member
  • *
  • Posts: 26
Problemas con el evento "OnKeyDown"
« on: December 21, 2010, 09:11:39 pm »
Hola, estoy haciendo mis primeros pasos en lazarus y tengo el siguiente problema, cuando capturo la tecla que se presiona en un conrtol TEdit por ej. no me reconoce las teclas "Enter", "Esc", "Backspace" entre otras. Si muestro el codigo capturado mediante "showmessage(inttostr(Key))" me devuelve siempre el valor 255.
Les comento que estoy usando la version 0.9.28.2.8 de lazarus sobre Ubuntu 10.04 LTS 64 bits y supongo que esta ahi el problema, porque si ejecuto el mismo codigo en otra pc con una distribucion de Ubuntu 32 bits funciona correctamente (aunque ahi tengo instalada la version 0.9.26.2.2).
Desde ya agradezco su interes.

captian jaster

  • Guest
Re: Problemas con el evento "OnKeyDown"
« Reply #1 on: December 22, 2010, 06:34:03 pm »
I'm not sure I understood your question(I did use google translate)
But I did a code and tried this:
Code: Pascal  [Select][+][-]
  1. Procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: char);
  2. begin
  3.   ShowMessage(Key);
  4. end;
  5.  
Is this what you wanted?

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: Problemas con el evento "OnKeyDown"
« Reply #2 on: December 22, 2010, 08:29:30 pm »
Hola, estoy haciendo mis primeros pasos en lazarus y tengo el siguiente problema, cuando capturo la tecla que se presiona en un conrtol TEdit por ej. no me reconoce las teclas "Enter", "Esc", "Backspace" entre otras. Si muestro el codigo capturado mediante "showmessage(inttostr(Key))" me devuelve siempre el valor 255.
Les comento que estoy usando la version 0.9.28.2.8 de lazarus sobre Ubuntu 10.04 LTS 64 bits y supongo que esta ahi el problema, porque si ejecuto el mismo codigo en otra pc con una distribucion de Ubuntu 32 bits funciona correctamente (aunque ahi tengo instalada la version 0.9.26.2.2).
Desde ya agradezco su interes.

Translate by my self (I'm a spanish user):

Quote
Hello, I starting with lazarus, and I have the next problem, When I catch the key that it's press on a TEdit Control por example, I can't take the keys, "enter", "esc", "backspace", etc. If I show the code captured using "ShowMessage(IntToStr(Key))", always I get the code 255. I using 0.9.28.2.8 Lazarus version, running on Ubuntu 10.04 LTS 64 bits, and I think that's the problem, because if I execute the same code under a 32 bits Ubuntu distro, it's work nice, but in the 32 bits distro I have installed 0.9.26.2 Lazarus's Version.

Thanks for your insteresting

/BlueIcaro

P.D: With this way, may be more people can help you.
 

captian jaster

  • Guest
Re: Problemas con el evento "OnKeyDown"
« Reply #3 on: December 22, 2010, 08:47:58 pm »
Hola, estoy haciendo mis primeros pasos en lazarus y tengo el siguiente problema, cuando capturo la tecla que se presiona en un conrtol TEdit por ej. no me reconoce las teclas "Enter", "Esc", "Backspace" entre otras. Si muestro el codigo capturado mediante "showmessage(inttostr(Key))" me devuelve siempre el valor 255.
Les comento que estoy usando la version 0.9.28.2.8 de lazarus sobre Ubuntu 10.04 LTS 64 bits y supongo que esta ahi el problema, porque si ejecuto el mismo codigo en otra pc con una distribucion de Ubuntu 32 bits funciona correctamente (aunque ahi tengo instalada la version 0.9.26.2.2).
Desde ya agradezco su interes.

Translate by my self (I'm a spanish user):

Quote
Hello, I starting with lazarus, and I have the next problem, When I catch the key that it's press on a TEdit Control por example, I can't take the keys, "enter", "esc", "backspace", etc. If I show the code captured using "ShowMessage(IntToStr(Key))", always I get the code 255. I using 0.9.28.2.8 Lazarus version, running on Ubuntu 10.04 LTS 64 bits, and I think that's the problem, because if I execute the same code under a 32 bits Ubuntu distro, it's work nice, but in the 32 bits distro I have installed 0.9.26.2 Lazarus's Version.

Thanks for your insteresting

/BlueIcaro

P.D: With this way, may be more people can help you.
 
Hyuk hyuk

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: Problemas con el evento "OnKeyDown"
« Reply #4 on: December 22, 2010, 09:51:57 pm »
Quote from: captain jaster link=topic=11519.msg57982#msg57982
Hyuk hyuk
[/quote

Well, I think it's not a good translation, but I think you can understand it

/BlueIcaro

captian jaster

  • Guest
Re: Problemas con el evento "OnKeyDown"
« Reply #5 on: December 22, 2010, 10:32:17 pm »
Quote from: captain jaster link=topic=11519.msg57982#msg57982
Hyuk hyuk
[/quote

Well, I think it's not a good translation, but I think you can understand it

/BlueIcaro
I don't think you caught my drift...
You said I'm a Spanish user.. Not that I speak Spanish..
It seemed kinda funny to me.. I can understand what he said too..
Thanks for the better translation.

hexxa

  • New Member
  • *
  • Posts: 26
Re: Problemas con el evento "OnKeyDown" - SOLUCIONADO
« Reply #6 on: December 23, 2010, 01:28:47 pm »
Les agradezo a los dos su ayuda, les comento que solucione el problema creando de nuevo la aplicacion e importando los formularios y de esa manera si me detecta bien el codigo de la tecla presionada. No entiendo cual es la razon pero esta funcionando. Gracias y saludos.

 

TinyPortal © 2005-2018