[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calculator.app: entering numbers from keyboard?
From: |
Fred Kiefer |
Subject: |
Re: Calculator.app: entering numbers from keyboard? |
Date: |
Sun, 19 Aug 2007 23:18:16 +0200 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20060911) |
Nicola Pero wrote:
>>
>>> I guess this question applies to EdenMath and Stepulator as well, but
>>> is there any way to receive input from the keyboard in
>>> Calculator.app? Otherwise, it's pretty tiresome to mouse around to
>>> enter every number and operation.
>>>
>>
>> You'd need to implement/override the keyDown: method
>
> Calculator.app used to use key equivalents for that, as in
>
> [button setKeyEquivalent: @"1"];
>
> I know this used to work XXX years ago: pressing '1' would be equivalent
> to pushing the '1' button :-)
>
> ... so if it doesn't work any longer, maybe key equivalents no longer
> work in the gui, or something has changed
> in the API and the Calculator.app code needs updating (or the way
> Calculator.app is using key equivalents
> is wrong) ?
>
OK, I have fixed this, Calculator should now work again. There still is
one issue in the GNUstep code that I don't understand. When we get a key
down event that the window and its views cannot handle. It is send again
with the command modifier added to it. Why do we do this? Is this just a
hack to keep old code working or is this a permanent feature of GNUstep
and Cocoa?
Fred
Re: Calculator.app: entering numbers from keyboard?, Riccardo, 2007/08/20