Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
Virtual key codes to mac conversion
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Runtime error 216 when lu...
by
MarkMLl
[
Today
at 10:27:42 pm]
Label color
by
lucamar
[
Today
at 10:26:47 pm]
[LAMW] Build Release Sig...
by
jmpessoa
[
Today
at 10:22:54 pm]
opendialog does not selec...
by
skalogryz
[
Today
at 10:16:06 pm]
[LAMW] Build Chipset Prob...
by
loaded
[
Today
at 10:03:26 pm]
FileExists() behaviour ch...
by
Bart
[
Today
at 09:56:20 pm]
Lag in detect change in i...
by
MarkMLl
[
Today
at 09:41:56 pm]
HiDPI seems to corrupt my...
by
JD
[
Today
at 09:24:13 pm]
Is there a way to combine...
by
krolikbest
[
Today
at 09:19:26 pm]
wfc (wave function collap...
by
Bart
[
Today
at 08:55:00 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Virtual key codes to mac conversion (Read 628 times)
xinyiman
Hero Member
Posts: 2145
Virtual key codes to mac conversion
«
on:
December 16, 2019, 04:56:31 pm »
Hi guys, is there a function that changes from virtual key codes to codes for mac os cocoa? Example
Code: Pascal
[Select]
[+]
[-]
VK_Q
:
Result
:
=
12
;
VK_W
:
Result
:
=
13
;
VK_E
:
Result
:
=
14
;
VK_R
:
Result
:
=
15
;
VK_T
:
Result
:
=
17
;
VK_Y
:
Result
:
=
16
;
VK_U
:
Result
:
=
32
;
VK_I
:
Result
:
=
34
;
VK_O
:
Result
:
=
31
;
VK_P
:
Result
:
=
35
;
VK_A
:
Result
:
=
0
;
VK_S
:
Result
:
=
1
;
VK_D
:
Result
:
=
2
;
VK_F
:
Result
:
=
3
;
VK_G
:
Result
:
=
5
;
VK_H
:
Result
:
=
4
;
VK_J
:
Result
:
=
38
;
VK_K
:
Result
:
=
40
;
VK_L
:
Result
:
=
37
;
VK_Z
:
Result
:
=
6
;
VK_X
:
Result
:
=
7
;
VK_C
:
Result
:
=
8
;
VK_V
:
Result
:
=
9
;
VK_B
:
Result
:
=
11
;
VK_N
:
Result
:
=
45
;
VK_M
:
Result
:
=
46
;
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
skalogryz
Global Moderator
Hero Member
Posts: 2549
Re: Virtual key codes to mac conversion
«
Reply #1 on:
December 16, 2019, 05:33:47 pm »
not really.
but all you need is to reverse MacCodeToVK() (from cocoautils.pas)
Logged
Patron Cocoa Widgetset development
https://www.patreon.com/skalogryz
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
Virtual key codes to mac conversion
TinyPortal
© 2005-2018