How do i ...
I want to use it when i press the enter (to do something ) or press Ctrl and Enter (to do other something )![]()
thanks a lot![]()
![]()
Professional Software Development Tools
How do i ...
I want to use it when i press the enter (to do something ) or press Ctrl and Enter (to do other something )![]()
thanks a lot![]()
![]()
In the Page --> On Key Action Tab,Originally Posted by Khattat
The list of Virtual Key Codes are listed in your AMS Help File. You'd find them there if you searched for 'virtual key codes' in the index tab.Code:if e_Key == 13 then -- The user pressed the enter key. if e_Key == 17 then -- The user pressed the ctrl key. end
On any On Key event the AMS runtime will build an e_Modifiers table for you that contains a true/false value to indicate if the <ctrl>, <alt> or <shift> are pressed.
I think something like this in the On Key event of the Page you are working with will get you what you want:
Code:-- Check to see if <ctrl> and <enter> are pressed if e_Modifiers.ctrl and e_Key == 13 then -- Put the actions that should happen on <ctrl>+<enter> here... -- Check to see if <enter> only is pressed elseif e_Key == 13 then -- Put the actions that should happen on <enter> here... end
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
thanks
but your codes didn't work
i have a list box and i want to use On Key. for example when i press enter appear this message
"You pressed enter"
and when i press the ctrl and enter appear this message :
"You pressed Ctrl and Enter "
but your codes didn't work![]()
![]()
Add the code that TJS posted previously to your Listbox Object's On Key Action Tab instead of On Page's On Key Action Tab.Originally Posted by Khattat
Oh Yes
I'm so sorry![]()
![]()
I got this list from this forum somewhere it might help you with other keys if needed. (good to keep this list hanging around)
LeftMouseButton = 1,
RightMouseButton = 2,
MiddleMouseButton = 4,
Backspace = 8,
Tab = 9,
Enter = 13,
Shift = 16,
Ctrl = 17,
Pause = 19,
CapsLock = 20,
Esc = 27,
Spacebar = 32,
PageUp = 33,
PageDown = 34,
End = 35,
Home = 36,
Left = 37,
Up = 38,
Right = 39,
Down = 40,
Insert = 45,
Delete = 46,
Zero = 48,
One = 49,
Two = 50,
Three = 51,
Four = 52,
Five = 53,
Six = 54,
Seven = 55,
Eight = 56,
Nine = 57,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
a = 65,
b = 66,
c = 67,
d = 68,
e = 69,
f = 70,
g = 71,
h = 72,
i = 73,
j = 74,
k = 75,
l = 76,
m = 77,
n = 78,
o = 79,
p = 80,
q = 81,
r = 82,
s = 83,
t = 84,
u = 85,
v = 86,
w = 87,
x = 88,
y = 89,
z = 90,
WindowsLeft = 91,
WindowsRight = 92,
Application = 93,
Numpad0 = 96,
Numpad1 = 97,
Numpad2 = 98,
Numpad3 = 99,
Numpad4 = 100,
Numpad5 = 101,
Numpad6 = 102,
Numpad7 = 103,
Numpad8 = 104,
Numpad9 = 105,
NumpadAsterisk = 106,
NumpadPlus = 107,
NumpadDash = 109,
NumpadPeriod = 110,
NumpadForwardslash = 111,
F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F11 = 122,
F12 = 123,
NumLock = 144,
ScrollLock = 145,
SemiColon = 186,
Equal = 187,
Comma = 188,
Dash = 189,
Period = 190,
Forwardslash = 191,
Backquote = 192,
OpenSquare = 219,
Backslash = 220,
CloseSquare = 221,
SingleQuote = 222
thanks jfxwave![]()
AMS 6 Online Help:
http://www.indigorose.com/webhelp/ams60/
and more specifically the ASCII table:
http://www.indigorose.com/webhelp/am...Misc/ASCII.htm
er...
http://www.indigorose.com/webhelp/am..._Key_Codes.htm
But, the ASCII table comes in handy too!
![]()
Last edited by Intrigued; 03-17-2006 at 04:12 PM.
Intrigued