For example, instead of deleting and increasing the tilt angle by 1, you could simply select the desired property and use the Ctrl + up arrow keys to increase or Ctrl + down arrow keys to decrease? This method is similar to what is done in the browser’s CSS using DevTools, where you can increase by ±0.1, ±1 or ±10 by pressing Ctrl, Alt or Shift along with the corresponding arrow key.
Is this feature currently available in KiCad 8 or has it never been implemented?
FreeCAD has an Increment / Decrement function under the mouse scrollwheel which I find quite handy. Every now and then I still find myself attempting to use it in KiCad.
But alas, a function like this is not (yet) implemented in KiCad.
Unfortunately. In the meantime, I have created an AutoHotKey macro that increases by 0.1, 1, and 10, it is approximate but effective for now.
#NoEnv
#SingleInstance, force
SetWorkingDir %A_ScriptDir%
#IfWinActive ahk_exe KiCad.exe
^Up::
ModifyNumber(1)
return
+Up::
ModifyNumber(10)
return
!Up::
ModifyNumber(0.1)
return
^Down::
ModifyNumber(-1)
return
+Down::
ModifyNumber(-10)
return
!Down::
ModifyNumber(-0.1)
return
ModifyNumber(increment) {
Send, ^a
Send, ^c
ClipWait 2
if ErrorLevel
return
if (SubStr(Clipboard, 1, 1) = "(") {
Send, {Esc}
return
}
Clipboard := StrReplace(Clipboard, ",", ".")
if RegExMatch(Clipboard, "(-?\d+[\.,]?\d*)", number) {
newNumber := number1 + increment
Clipboard := RegExReplace(Clipboard, "(-?\d+[\.,]?\d*)", newNumber)
}
Clipboard := StrReplace(Clipboard, ".", ",")
Send, ^v
Send,{Enter}
Click, Left, 1
}
#IfWinActive
It has limitations: the mouse must stay over the box to be incremented, but if you use the keyboard you don’t need to move it; it is not visually beauty, but it can be improved.
1 Like
Added more controls, works only if the mouse is over the properties panel:
; V1.2
#NoEnv
#NoTrayIcon
#SingleInstance force
SetBatchLines, -1
#IfWinActive ahk_exe KiCad.exe
~^Up::
if GetMPos()
ModifyNumber(1)
return
~+Up::
if GetMPos()
ModifyNumber(10)
return
~!Up::
if GetMPos()
ModifyNumber(0.1)
return
~^Down::
if GetMPos()
ModifyNumber(-1)
return
~+Down::
if GetMPos()
ModifyNumber(-10)
return
~!Down::
if GetMPos()
ModifyNumber(-0.1)
return
GetMPos(){
MouseGetPos, mouseX, mouseY
if (mouseX >= 194 && mouseX <= 351 && mouseY >= 206 && mouseY <= 946)
return true
else
return false
}
ModifyNumber(increment) {
Send, ^a
Send, ^c
ClipWait 2
if ErrorLevel
return
if (SubStr(Clipboard, 1, 1) = "(" || InStr(Clipboard, "x") || InStr(Clipboard, "_")) {
Send, {Esc}
Click, Left, 1
return
}
Clipboard := StrReplace(Clipboard, ",", ".")
if RegExMatch(Clipboard, "(-?\d+[\.,]?\d*)", number) {
newNumber := number1 + increment
newNumber := Round(newNumber, 2)
newNumber := RegExReplace(newNumber, "\.0+$", "")
Clipboard := RegExReplace(Clipboard, "(-?\d+[\.,]?\d*)", newNumber)
}
Clipboard := StrReplace(Clipboard, ".", ",")
Send, ^v
Send,{Enter}
Click, Left, 1
}
#IfWinActive
Amusing myself…
Perhaps you know that you can set the Rotation in Pref’s and use the input-field and set Hot-Keys…
I set the Rotation Angle to 0.5deg for this video demo (perhaps mostly for users not wanting to mess with a Macro or Plugin…)
When inputing a value (such as 30deg) in demo then, holding down the R key, the Footprint rotates 30 plus the pref’s setting value and goes from there…
FYI - On my System (mac), holding down the Shift+Ctrl+R continuously rotates in Neg direction…
It is a very basic function, it only works for rotation and not for the other properties, as well as having a single resolution that can only be changed by opening the options