← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: improve keyboard handling - simulate mouseclick with RETURN

 

On 3/2/2014 2:29 AM, Henner Zeller wrote:
> Hi,
> For small changes, or when I only have a touchpad available, I like to
> use the keyboard for editing tasks, so I appreciate that the
> cursor-keys control the cross-hair similar to the mouse.
> 
> However to finish a move initiated with 'm' followed by cursor
> movements, one still has to press the mouse-button, thus having to
> leave the keyboard and probably mess up the precise placement. This
> slows down editing and is inconsistent.
> 
> This patch wires the 'Return' key as if the left mouse button was
> pressed (in eeschema and pcbnew).
> 
> Commit message:
> Have the <RETURN>-key in editing tasks behave like a mouse-click at
> the same position.
> 
> View here
> https://github.com/hzeller/kicad/compare/master...enter-is-like-mouseclick
> 
> Download here:
> https://github.com/hzeller/kicad/compare/master...enter-is-like-mouseclick.diff
> 
> -h

Hey Henner,

You also need to add your change to the schematic component library
editor and board footprint editor so they behave the same way.  The
functions you are looking for are:

FOOTPRINT_EDIT_FRAME::GeneralControle()

and:

LIB_EDIT_FRAME::GeneralControle()

This way the the component and footprint editors will have the same
behavior as the schematic and board editors.  Also, did you verify there
are no other behavior issues with menus (both regular and context) with
your patch.  Once a key is routed to the hotkey handler, it does not get
passed on to the rest of the event handler chain so your patch may cause
some odd behavior with other main frame controls.

Thanks,

Wayne




Follow ups

References