[crossfire] [PATCH 1/2] Keybindings: multiple changes

Arvid Brodin arvidb at kth.se
Sun Nov 3 12:18:27 CST 2013


On 2013-11-03 18:15, Arvid Brodin wrote:
> On 2013-11-03 16:50, Kevin Zheng wrote:
>> On 11/03/2013 08:50, Arvid Brodin wrote:
> 
> []
> 
>>> - 3 bindings of 'a' to "apply" (to handle different shift state and modifier 
>>>   states). Replace with a single binding of 'a' with "Any" flag.
>>
>> In hindsight, there are some issues with setting the directional keys
>> with the "Any" flag. I usually bind ALT-B to 'cast burning hands', but
>> it conflicts with the 'Any' definition of a NetHack-style direction key.
>> Perhaps the 'Normal' checkbox should come back?
> 
> It does conflict. Before, you were allowed to enter conflicting keybindings,
> and now, you are not. The order the keybinds were made mattered before. Look
> at parse_key() in the old code. They find several matches: first_match, then
> tries to find a perfect match (keyentry), then proceeds to completely ignore
> the keyentry match...
> 

I took another look at this code and the keyentry isn't ignoread at all. The
code actually searches through the bindings to find a "perfect" match - if 
no such match is found, it selects the first match found that matches any of
the key modifier flags set.

-- 
Arvid


More information about the crossfire mailing list