[wingide-users] idea: numpad as "go to line"

Wingware Support support at wingware.com
Fri Dec 3 13:34:23 MST 2010


On 12/3/10 1:21 PM, Phil Vandry wrote:
> On 2010-12-03, at 10:54 , Wing IDE Support wrote:
>> On 12/3/10 8:41 AM, Lukasz Michalski wrote:
>>> It would be easier for me to use numpad keyboard instead. I don't use
>>> numpad for anything anyway and I think the most programmers don't use it
>>> too.
>>
>> You could try binding goto-line to the key of your choice in the
>> Custom Key Binding preference.
>
> Would this really work? The numeric keypad keypress has to not only
> invoke the goto-line function but supply the first digit of the desired
> line number.

You can add the keypad support by adding the following key bindings in 
the Keyboard / Custom Key Bindings preference:

Kp_1 -> initiate-numeric-modifier(digit=1)
Kp_2 -> initiate-numeric-modifier(digit=2)
(etc)
Kp_add -> goto-line

Then pressing a number on the keypad followed by the key pad + button 
goes to that line.  The enter key does not work, however, because it is 
swallowed by the number entry area and then goto-line is never executed.

> It sounds like a good idea and I would be tempted to try to implement it
> with such a script... if only I used a keyboard that had a numeric
> keypad (which I don't, I use a HHKB) and if only I didn't have an
> alternative goto-line method that my fingers know how to do
> automatically since a long time (which is colon + line number + enter in
> vi mode).

In case you didn't know, this does work in Wing's vi emulation as well 
as line number + Shift-G when you're in browse mode.

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list