Keycode script

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Keycode script

Post by Graywolf »

Code: Select all

{
	
	KB_1				[1]
	KB_2            [2]
	KB_3            [3]
	KB_4            [4]
	KB_5            [5]
	KB_6            [6]
	KB_7            [7]
	KB_8            [8]
	KB_9            [9]
	KB_0            [10]
	KB_Q            [14]
	KB_W            [15]
	KB_E            [16]
	KB_R            [17]
	KB_T            [18]
	KB_Y            [19]
	KB_U            [20]
	KB_I            [21]
	KB_O            [22]
	KB_P            [23]
	KB_A            [26]
	KB_S            [27]
	KB_D            [28]
	KB_F            [29]
	KB_G            [30]
	KB_H            [31]
	KB_J            [32]
	KB_K            [33]
	KB_L            [34]
	KB_Z            [37]
	KB_X            [38]
	KB_C            [39]
	KB_V            [40]
	KB_B            [41]
	KB_N            [42]
	KB_M            [43]
	KB_COMMA        [80]
	KB_PERIOD       [44]
	KB_SLASH        [45]
	KB_SHIFT        [36]
	KB_ENTER        [24]
	KB_CTRL         [25]
	KB_TAB          [13]
	KB_ALT          [47]
	KB_SPACE        [46]
	KB_UP           [55]
	KB_DOWN         [56]
	KB_LEFT         [57]
	KB_RIGHT        [58]
	KB_PRINTSCRN    [71]
	KB_BREAK        [11]
	KB_PAGEUP       [51]
	KB_PAGEDOWN     [54]
	KB_DELETE       [52]
	KB_END          [53]
	KB_INSERT       [49]
	KB_HOME         [50]
	KB_BACKSPACE    [12]
	KB_F1           [59]
	KB_F2           [60]
	KB_F3           [61]
	KB_F4           [62]
	KB_F5           [63]
	KB_F6           [64]
	KB_F7           [65]
	KB_F8           [66]
	KB_F9           [67]
	KB_F10          [68]
	KB_F11          [69]
	KB_F12          [70]
	KB_LBRACKET     [75]
	KB_RBRACKET     [76]
	KB_EQUALS       [77]
	KB_COLON        [79]
	KB_QUOTE        [35]

	MOUSE_LB        [72]
	MOUSE_RB        [73]
	MOUSE_MB        [74]

}
Add a dummy pawn to a level, give it this script, name it something like "INPUT", then you can get scan codes with ease:

if(IsKeyDown(INPUT.KB_ENTER));
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Keycode script

Post by Juutis »

Nice! So simple yet so useful.
Pain is only psychological.
Post Reply