Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Values of the keys in OnKeyDown
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
FPC 3.2.4-rc1 available
by
Fred vS
[
Today
at 05:45:33 pm]
I hope FreePascal can sup...
by
Fibonacci
[
Today
at 04:22:41 pm]
FPC Unleashed (inline var...
by
ccrause
[
Today
at 04:10:31 pm]
Elite Arcade
by
Guva
[
Today
at 03:41:28 pm]
Building units fails afte...
by
NormanDunbar
[
Today
at 03:36:38 pm]
Little bit...
by
Thaddy
[
Today
at 02:19:01 pm]
[SOLVED] Cannot build Uni...
by
Thausand
[
Today
at 02:18:34 pm]
default pin settings, atm...
by
ccrause
[
Today
at 11:45:37 am]
TChart how setup nicestep...
by
eldonfsr
[
Today
at 05:18:14 am]
AI assisted translation o...
by
schuler
[
Today
at 03:07:59 am]
Can I get the position an...
by
wp
[
Today
at 12:23:04 am]
Translate .lfm file in a ...
by
wp
[
Today
at 12:07:11 am]
Playing video without to ...
by
n7800
[April 17, 2026, 11:51:39 pm]
Delimited text - how find...
by
n7800
[April 17, 2026, 11:28:25 pm]
overloading issues fpc3.2...
by
Martin_fr
[April 17, 2026, 10:21:07 pm]
Ann: Deinline: a de-inlin...
by
LeP
[April 17, 2026, 09:58:08 pm]
Seeking advice on setting...
by
schuler
[April 17, 2026, 03:36:28 pm]
Ann: DeCoperators
by
DomingoGP
[April 17, 2026, 03:23:39 pm]
Error: Compilation raised...
by
marcov
[April 17, 2026, 02:44:06 pm]
TLazSerial : serial port ...
by
CM630
[April 17, 2026, 09:50:34 am]
[Solved] Help needed comp...
by
landolfi
[April 17, 2026, 02:45:10 am]
DataPort or Synpase stat...
by
eldonfsr
[April 16, 2026, 11:32:18 pm]
[FPC 3.2.4, Windows] PTC ...
by
Fred vS
[April 16, 2026, 08:26:24 pm]
IDE: Property editor does...
by
dsiders
[April 16, 2026, 07:04:22 pm]
What is wrong with this c...
by
OH1KH
[April 16, 2026, 04:32:48 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Values of the keys in OnKeyDown (Read 14803 times)
T-bear
Full Member
Posts: 160
Values of the keys in OnKeyDown
«
on:
April 04, 2011, 11:42:00 am »
Whats the value of the keybordbuttons 1, 2, 3 ..., and is there a list with those values for every button on the keybord?
Thanks!
Logged
Blaazen
Hero Member
Posts: 3241
POKE 54296,15
Re: Values of the keys in OnKeyDown
«
Reply #1 on:
April 04, 2011, 01:02:56 pm »
Just simply try it.
Make New Project and OnKeyDown event of Form1 put this code:
Code:
[Select]
Caption:=inttostr(Key);
Logged
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21
Try Eye-Candy Controls:
https://sourceforge.net/projects/eccontrols/files/
Zoran
Hero Member
Posts: 1988
Re: Values of the keys in OnKeyDown
«
Reply #2 on:
April 04, 2011, 02:01:42 pm »
You can use virtual key codes defined by microsoft, see here:
http://msdn.microsoft.com/en-us/library/ms645540
or
http://msdn.microsoft.com/en-us/library/dd375731%28VS.85%29.aspx
Plus, for letters and number keys in lazarus you can also use VK_1, VK_2, ... VK_A, VK_B, ...
All these constants are found in LCLType unit, see and find their declarations there.
«
Last Edit: April 05, 2011, 09:10:44 pm by Zoran
»
Logged
Swan, ZX Spectrum emulator
https://github.com/zoran-vucenovic/swan
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Values of the keys in OnKeyDown
TinyPortal
© 2005-2018