Thread Tools Display Modes
09-16-12, 01:40 AM   #1
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
oBindings state evaluation problem

I have modified oBindings to accomodate extra keys on my keyboard and I am noticing some odd behaviour with macro condition evaluation. For example both [mod:rshift,mod:alt] and [nomod:rshift,mod:alt] evaluating to true concurrently, or getting different results depending on what modifiers were pushed well before the evaluation as if a button never returned to its base state. It is definitely not a keyboard error because actual macros all work as expected, it's only the state driver.

My goal with the modification was to make my extra keys available to WoW without sacrificing any standard keys or their modifiers. The idea is to have each virtual key send a standard key + right shift combination, and have WoW differentiate between actual and virtual keys by explicitly requiring or prohibiting right shift in state conditions. This is my current state list for the virtual and the standard keys respectively:

Code:
local g_key_states = {
	'g_nomod|[mod:rshift,nomod:alt,nomod:ctrl,nomod:lshift]',
	'g_alt|[mod:rshift,mod:alt]',
	'g_ctrl|[mod:rshift,mod:ctrl]',
	'g_shift|[mod:rshift,mod:lshift]',
}

local o_key_states = {
	'o_nomod|[nomod:rshift,nomod:alt,nomod:ctrl,nomod:lshift]',
	'o_alt|[nomod:rshift,mod:alt]',
	'o_ctrl|[nomod:rshift,mod:ctrl]',
	'o_shift|[nomod:rshift,mod:lshift]',
}
And these are some of the test results (G1 = RSHIFT-F1):

Code:
bindings = {
	o_nomod = { F1 = 'm|/s nomod f1' },
	g_nomod = { F1 = 'm|/s nomod g1' },
}

F1 --> 'nomod f1'
G1 --> 'nomod g1'
ALT-F1 --> 'nomod f1'
ALT-G1 --> 'nomod f1'

bindings = {
	-- o_nomod = { F1 = 'm|/s nomod f1' },
	g_nomod = { F1 = 'm|/s nomod g1' },
}

F1 --> false initially, 'nomod g1' after G1 has been pushed at least once
G1 --> 'nomod g1'
ALT-F1 --> false initially 'nomod g1' after
ALT-G1 --> false initially, 'nomod g1' after

bindings = {
	o_nomod = { F1 = 'm|/s nomod f1' },
	-- g_nomod = { F1 = 'm|/s nomod g1' },
}

F1 --> 'nomod f1'
G1 --> 'nomod f1'
ALT-F1 --> 'nomod f1'
ALT-G1 --> 'nomod f1'

bindings = {
	o_alt = { F1 = 'm|/s alt f1' },
	g_alt = { F1 = 'm|/s alt g1' },
}

F1 --> false
G1 --> false
ALT-F1 --> 'alt f1'
ALT-G1 --> 'alt g1'

bindings = {
	-- o_alt = { F1 = 'm|/s alt f1' },
	g_alt = { F1 = 'm|/s alt g1' },
}

F1 --> false
G1 --> false
ALT-F1 --> false initially, 'alt g1' after ALT-G1 has been pushed at least once
ALT-G1 --> 'alt g1'

bindings = {
	o_alt = { F1 = 'm|/s alt f1' },
	-- g_alt = { F1 = 'm|/s alt g1' },
}

F1 --> false
G1 --> false
ALT-F1 --> 'alt f1'
ALT-G1 --> 'alt f1'
For the record, F1 and all its modifier combinations are unbound initially so no Blizzard key is interfering. Here is the version I used for the tests. Except for some profile loading logic this is as close to the current Git revision as I could make it. Any idea why this is happening?

UPDATE: Seems the culprit will be SecureCmdOptionParse in SecureStateDriver.lua and the order in which states are added to the list of values. Needs more testing though.

Last edited by nailertn : 09-16-12 at 09:32 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » oBindings state evaluation problem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off