- Home
- Downloads
-
Addons & Mods
Featured
World of Warcraft
5,105 Addons
-
Popular Downloads
- Top World of Warcraft Addons
- Top Minecraft Server Mods
- Top Rift Addons
- Top Skyrim Mods
- Top World of Tanks WoT Mods
- Top Starcraft II Maps
- Top Terraria Maps
- Top Runes of Magic Addons
- Top Warhammer Online Addons
- Top Age of Conan Addons
-
- Curse Client
- Premium
- News
- Giveaways
- Videos
- Forums
SetConsoleKey
- 0 Likes
- World of Warcraft
- 11 Monthly Downloads
- Supports: 4.3
- 614 Total Downloads
- Updated 11/30/2011 3:15:49 PM
- Created 3/23/2011 12:30:24 PM
- 0 Favorites
- Project Site
- Comments
- Release Type: Release
- License: Public Domain
- Newest File: Release 1.0.3
About SetConsoleKey
This addon is used to remember your SetConsoleKey keybinding when using wow in -console mode. By design, the client will not remember your console keybind and I find myself annoyed with having to reset it every time I restart the game. This simple addon hooks the SetConsoleKey function so it can save your last console keybind and then loads it on startup.
Note: Due to the way addons are loaded, this addon can only set your console key after you have selected a character. Prior to selecting a character (that loads this addon) The console key will remain bound to the default tilde key.
I did not include any command line scripts as I did not feel they were necessary. Since this hooks the SetConsoleKey function itself, you simply set the key the normal way i.e. /script SetConsoleKey("KEYTOBIND");
If you are unfamiliar with console mode and/or the usage of this function visit: http:www.wowpedia.org/API_SetConsoleKey
------------------------------------------------------------------------
r10 | papsol | 2011-11-30 21:14:59 +0000 (Wed, 30 Nov 2011) | 1 line
Changed paths:
A /tags/Release 1.0.3 (from /trunk:9)
Tagging as Release 1.0.3
------------------------------------------------------------------------
r9 | papsol | 2011-11-30 21:14:26 +0000 (Wed, 30 Nov 2011) | 3 lines
Changed paths:
M /trunk/SetConsoleKey.toc
v1.0.3
TOC update
------------------------------------------------------------------------
| File Name | Release Type | Game Version | Downloads | Date |
|---|---|---|---|---|
| Release 1.0.3 | Release | 4.3 | 108 | 11/30/2011 3:15:49 PM |
| Release 1.0.2 | Release | 4.2 | 183 | 6/29/2011 8:52:33 AM |
| Release 1.0.1 | Release | 4.1 | 140 | 5/3/2011 9:18:53 AM |
| Release v1.0.0 | Release | 4.0.6 | 184 | 3/23/2011 12:38:06 PM |
Top Downloads
-
- Bagnon
- Bags & Inventory
- 359,243 Monthly Downloads
-
- Deadly Boss Mods
- Combat and Boss Encounters
- 297,158 Monthly Downloads
-
- Recount
- Combat
- 295,968 Monthly Downloads
-
- SpellFlash
- PvP, Buffs & Debuffs, Quests & Leveling, Action Bars, and Combat
- 284,254 Monthly Downloads
-
- GatherMate2_Data
- Achievements
- 208,828 Monthly Downloads
Comments
Feature request: to enable/disable/toggle the console so we still have our settings and can play the game without debugging for awhile. Add /run SetConsoleKey("on"), /run SetConsoleKey("off"), or a minimap button? For example, it seems to disable the console with any invalid shift key like tilde, or enable to restore the saved variable, SCK_DATA.
Test with the code below. Enabled if key is like "F7". Disabled if tilde in front of key like "~F7". In the future, the code could be much simpler if SCK_DATA was a table = {} and not just a value.
function SetConsoleKey(...)
local newkey = ... or ""
local disabledkey = "~" -- key to disable console, e.g. tilde = Shift-`
local lastdisabled = ( strsub(SCK_DATA,1,1) == disabledkey ) -- disabled if tilde in front of key
local lastkey = string.gsub(SCK_DATA, "("..disabledkey..")", "") -- key without tilde
if ( strlower(newkey) == "toggle" ) then -- /run SetConsoleKey("toggle")
if ( lastdisabled and strlen(lastkey) > 0 ) then newkey = "on"
else newkey = "off"
end
end
-- enable console and restore old key without tilde
if ( strlower(newkey) == "on" ) then -- /run SetConsoleKey("on")
SCK_DATA = lastkey;
print("SetConsoleKey:", SCK_DATA);
BlizSetConsoleKey(SCK_DATA);
-- disable console with tilde in front of key
elseif ( strlower(newkey) == "off" ) then -- /run SetConsoleKey("off")
SCK_DATA = disabledkey..lastkey;
print("SetConsoleKey:", "off");
BlizSetConsoleKey(SCK_DATA);
-- set new key
else -- /run SetConsoleKey(...)
SCK_DATA = newkey;
print("SetConsoleKey:", SCK_DATA);
BlizSetConsoleKey(SCK_DATA);
end
P.S. Interesting how Blizz defines the default as a tilde-key, when it is really a reverse quote. Tilde is Shift-` and shifting is invalid. Probably preferring tilde since easier to say and see.