$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
dabbling, frivolling, idling, loafing, loitering, playing and procrastinating
25 Oct // php the_time('Y') ?>
I recently started attempting to game on my Ubuntu machine using Wine, and I frequently play Warcraft III and World of Warcraft. However, when playing both of these I use Ventrilo to talk to my friends, so I thought easy, I’ll just run Ventrilo through Wine and have no problems. Wrong. Ventrilo does load up fine, however using Push-To-Talk is almost a useless option as it only works when Ventrilo is the active window. So to fix that someone make an application called VentriloCtrl (as of writing on version 0.5) and this simulates a keypress so that the push to talk functionality works from anywhere. So I set this up as one of the buttons on my MX revolution…
The only downside however is that the key it presses is hard coded as the letter “A”, not exactly the best key since most gamers run with WSAD to move around and for about a week I was beginning to annoy people by every time I pressed ‘A’ to move around I was transmitting. A quick dig through the code shows us where the key is defined, currently on line 17…
#define SIMULATEKEY XK_A // Simulate Key Press
Excellent, so changing this should’nt be too hard. After a quick search around I found a nice long list of all the codes that you could use instead of “XK_A”…
XK_BackSpace
XK_Tab
XK_Linefeed
XK_Clear
XK_Return
XK_Pause
XK_Escape
XK_Delete
XK_Multi_key
XK_Kanji
XK_Home
XK_Left
XK_Up
XK_Right
XK_Down
XK_Prior
XK_Next
XK_End
XK_Begin
XK_Select
XK_Print
XK_Execute
XK_Insert
XK_Undo
XK_Redo
XK_Menu
XK_Find
XK_Cancel
XK_Help
XK_Break
XK_Mode_switch
XK_script_switch
XK_Num_Lock
XK_KP_Space
XK_KP_Tab
XK_KP_Enter
XK_KP_F1
XK_KP_F2
XK_KP_F3
XK_KP_F4
XK_KP_Equal
XK_KP_Multiply
XK_KP_Add
XK_KP_Separator
XK_KP_Subtract
XK_KP_Decimal
XK_KP_Divide
XK_KP_0
XK_KP_1
XK_KP_2
XK_KP_3
XK_KP_4
XK_KP_5
XK_KP_6
XK_KP_7
XK_KP_8
XK_KP_9
XK_F1
XK_F2
XK_F3
XK_F4
XK_F5
XK_F6
XK_F7
XK_F8
XK_F9
XK_F10
XK_F11
XK_L1
XK_F12
XK_L2
XK_F13
XK_L3
XK_F14
XK_L4
XK_F15
XK_L5
XK_F16
XK_L6
XK_F17
XK_L7
XK_F18
XK_L8
XK_F19
XK_L9
XK_F20
XK_L10
XK_F21
XK_R1
XK_F22
XK_R2
XK_F23
XK_R3
XK_F24
XK_R4
XK_F25
XK_R5
XK_F26
XK_R6
XK_F27
XK_R7
XK_F28
XK_R8
XK_F29
XK_R9
XK_F30
XK_R10
XK_F31
XK_R11
XK_F32
XK_R12
XK_R13
XK_F33
XK_F34
XK_R14
XK_F35
XK_R15
XK_Shift_L
XK_Shift_R
XK_Control_L
XK_Control_R
XK_Caps_Lock
XK_Shift_Lock
XK_Meta_L
XK_Meta_R
XK_Alt_L
XK_Alt_R
XK_Super_L
XK_Super_R
XK_Hyper_L
XK_Hyper_R
XK_space
XK_exclam
XK_quotedbl
XK_numbersign
XK_dollar
XK_percent
XK_ampersand
XK_quoteright
XK_parenleft
XK_parenright
XK_asterisk
XK_plus
XK_comma
XK_minus
XK_period
XK_slash
XK_0
XK_1
XK_2
XK_3
XK_4
XK_5
XK_6
XK_7
XK_8
XK_9
XK_colon
XK_semicolon
XK_less
XK_equal
XK_greater
XK_question
XK_at
XK_A
XK_B
XK_C
XK_D
XK_E
XK_F
XK_G
XK_H
XK_I
XK_J
XK_K
XK_L
XK_M
XK_N
XK_O
XK_P
XK_Q
XK_R
XK_S
XK_T
XK_U
XK_V
XK_W
XK_X
XK_Y
XK_Z
XK_bracketleft
XK_backslash
XK_bracketright
XK_asciicircum
XK_underscore
XK_quoteleft
XK_lca
XK_lcb
XK_lcc
XK_lcd
XK_lce
XK_lcf
XK_lcg
XK_lch
XK_lci
XK_lcj
XK_lck
XK_lcl
XK_lcm
XK_lcn
XK_lco
XK_lcp
XK_lcq
XK_lcr
XK_lcs
XK_lct
XK_lcu
XK_lcv
XK_lcw
XK_lcx
XK_lcy
XK_lcz
XK_braceleft
XK_bar
XK_braceright
XK_asciitilde
XK_nobreakspace
XK_exclamdown
XK_cent
XK_sterling
XK_currency
XK_yen
XK_brokenbar
XK_section
XK_diaeresis
XK_copyright
XK_ordfeminine
XK_guillemotleft
XK_notsign
XK_hyphen
XK_registered
XK_macron
XK_degree
XK_plusminus
XK_twosuperior
XK_threesuperior
XK_acute
XK_mu
XK_paragraph
XK_periodcentered
XK_cedilla
XK_onesuperior
XK_masculine
XK_guillemotright
XK_onequarter
XK_onehalf
XK_threequarters
XK_questiondown
XK_Agrave
XK_Aacute
XK_Acircumflex
XK_Atilde
XK_Adiaeresis
XK_Aring
XK_AE
XK_Ccedilla
XK_Egrave
XK_Eacute
XK_Ecircumflex
XK_Ediaeresis
XK_Igrave
XK_Iacute
XK_Icircumflex
XK_Idiaeresis
XK_Eth
XK_Ntilde
XK_Ograve
XK_Oacute
XK_Ocircumflex
XK_Otilde
XK_Odiaeresis
XK_multiply
XK_Ooblique
XK_Ugrave
XK_Uacute
XK_Ucircumflex
XK_Udiaeresis
XK_Yacute
XK_Thorn
XK_ssharp
XK_lcagrave
XK_lcaacute
XK_lcacircumflex
XK_lcatilde
XK_lcadiaeresis
XK_lcaring
XK_lcae
XK_lcccedilla
XK_lcegrave
XK_lceacute
XK_lcecircumflex
XK_lcediaeresis
XK_lcigrave
XK_lciacute
XK_lcicircumflex
XK_lcidiaeresis
XK_lceth
XK_lcntilde
XK_lcograve
XK_lcoacute
XK_lcocircumflex
XK_lcotilde
XK_lcodiaeresis
XK_division
XK_oslash
XK_lcugrave
XK_lcuacute
XK_lcucircumflex
XK_lcudiaeresis
XK_lcyacute
XK_lcthorn
XK_ydiaeresis
Now obviously, over half of those are going to be quite useless as they will create key-presses resulting in keys being randomly typed. The best ones that I have found for use with Ventrilo & games are…
XK_Pause
XK_Break
XK_Num_Lock
XK_KP_5
XK_Shift_Lock
99% of the time these keys will have no effect on your games at all, so they are the safest keys to use for transmitting. Personally I use “XK_KP_5″ which is the same as pressing the number 5 on your keypad when num lock is off, ie. nothing happens. Using that key also doesn’t mean you have to have num lock off either as this is a simulated key press, so unless some game gets clever, or you use the num pad and have assigned this key to something else, its possibly the best key to use for Push-To-Talk since it does not get used for anything.
So to change the key all you do is replace “XK_A” with whatever you want to use, then “make” and “make install” and you’re done
2 Responses for "Howto change the key pressed by VentriloCtrl"
Thanks heaps for this man! “a” is a very annoying hardkey…
Thankz for the article!
Leave a reply