← Back to team overview

kicad-developers team mailing list archive

Add hotkey shortcut 'Q' for "Add a no connected flag" action -- eeschema patch

 

Have a good day,

After I done work on my scheme I`ll need mark pins without
connects, but not forund hotkey for it. This patch add hotkey
shortcut 'Q' for "Add a no connected flag" action.

I think in near future we need to do special window for every
kicad application, where user can define hotkey for every
function -- like kde4 system settings -> keyboard -> hotkeys.

What do you think about?

Regards,
--
    Yury Khalyavin
=== modified file eeschema/hotkeys.cpp
--- eeschema/hotkeys.cpp	2010-07-17 12:04:42 +0000
+++ eeschema/hotkeys.cpp	2010-07-20 11:38:47 +0000
@@ -106,6 +106,8 @@
 static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' );
 static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ),
                                      HK_ADD_NEW_COMPONENT, 'A' );
+static Ki_HotkeyInfo HkAddNoConn( wxT( "Add a no connected flag" ),
+                                  HK_ADD_NOCONN_FLAG, 'Q' );
 static Ki_HotkeyInfo HkMirrorYComponent( wxT( "Mirror Y Component" ),
                                          HK_MIRROR_Y_COMPONENT, 'Y' );
 static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ),
@@ -190,6 +192,7 @@
     &HkEditComponentFootprint,
     &HkBeginWire,
     &HkAddLabel,
+    &HkAddNoConn,
     NULL
 };
 
@@ -419,6 +422,16 @@
         }
         break;
 
+    case HK_ADD_NOCONN_FLAG:      // Add a no connected flag
+        if( !ItemInEdit )
+        {
+            if( m_ID_current_state != ID_NOCONN_BUTT )
+                SetToolID( ID_NOCONN_BUTT, wxCURSOR_PENCIL,
+                          _( "Add a no connected flag" ) );
+            OnLeftClick( DC, MousePos );
+        }
+        break;
+
     case HK_ROTATE:       // Component or other schematic item rotation
 
         if( DrawStruct == NULL )

=== modified file eeschema/hotkeys.h
--- eeschema/hotkeys.h	2010-07-15 14:18:11 +0000
+++ eeschema/hotkeys.h	2010-07-20 11:38:47 +0000
@@ -32,7 +32,8 @@
     HK_DRAG,
     HK_ADD_NEW_COMPONENT,
     HK_BEGIN_WIRE,
-    HK_ADD_LABEL
+    HK_ADD_LABEL,
+    HK_ADD_NOCONN_FLAG
 };
 
 // List of hotkey descriptors for eeschema

Follow ups