Allegro自定义快捷键(修改 ix iy 的步进,其他快捷功能)
为了能够快速打孔,我们需要设置ix iy 的步进,
如下:
set FullStep = 50
set HalfStep = 25
set MinStep = 5
然后基于设置的步进,设置对应的快捷键,
如下:
alias SUp "move; iy $MinStep"
alias SDown "move; iy -$MinStep"
alias SLeft "move; ix -$MinStep"
alias SRight "move; ix $MinStep"
alias CUp iy $HalfStep
alias CDown iy -$HalfStep
alias CLeft ix -$HalfStep
alias CRight ix $HalfStep
funckey j ix -$FullStep
funckey k iy -$FullStep
funckey l ix $FullStep
funckey i iy $FullStep
funckey O ix $FullStep iy $FullStep
funckey I ix -$FullStep iy $FullStep
funckey K ix -$FullStep iy -$FullStep
funckey L ix $FullStep iy -$FullStep
但是在运行过程中,我们可能需要动态修改步进值,
这就需要设置快捷键,来修改这些步进值,
如下:
alias CF2 "set HalfStep = 20; set FullStep = 40;echo 'fullstep='$fullstep"
alias CF3 "set HalfStep = 25; set FullStep = 50;echo 'fullstep='$fullstep"
alias CF4 "set HalfStep = 40; set FullStep = 80;echo 'fullstep='$fullstep"
alias CF5 "set HalfStep = 50; set FullStep = 100;echo 'fullstep='$fullstep"
alias CF6 "set HalfStep = 60; set FullStep = 120;echo 'fullstep='$fullstep"
alias CF7 "set HalfStep = 70; set FullStep = 140;echo 'fullstep='$fullstep"
alias CF8 "set HalfStep = 80; set FullStep = 160;echo 'fullstep='$fullstep"
alias CF9 "set HalfStep = 90; set FullStep = 180;echo 'fullstep='$fullstep"
alias CF10 "set HalfStep = 100; set FullStep = 200;echo 'fullstep='$fullstep"
alias CF11 "set HalfStep = 110; set FullStep = 220;echo 'fullstep='$fullstep"
alias CF12 "set HalfStep = 120; set FullStep = 240;echo 'fullstep='$fullstep"
修改了变量之后,并不能生效,还需要重新生成alias 和funckey,
如下:
alias CSF12 "funckey j ix -$FullStep;
funckey k iy -$FullStep;
funckey l ix $FullStep;
funckey i iy $FullStep;
funckey O ix $FullStep iy $FullStep;
funckey I ix -$FullStep iy $FullStep;
funckey K ix -$FullStep iy -$FullStep;
funckey L ix $FullStep iy -$FullStep;
alias CUp iy $HalfStep;
alias CDown iy -$HalfStep;
alias CLeft ix -$HalfStep;
alias CRight ix $HalfStep;
echo 'save fullstep='$fullstep"
+++++++++++++++++++++++++++++++++++++++++
注:
常用的自定义快捷键
布局阶段常用的
alias Del delete
alias Esc done
alias ~P place manual
funckey p pick
funckey m move
funckey r angle 90
funckey R angle 45
funckey g group
funckey f complete
布线阶段常用的
funckey w add connect
funckey v pop swap
funckey Y pop bbdrill
funckey t toggle
funckey + subclass -+
funckey - subclass --
funckey = 'subclass -+; subclass -+'
funckey 0 'altsubclass -+; altsubclass -+'
funckey 9 altsubclass --
funckey s slide
funckey b shape select
funckey c change
funckey n rats net
funckey u unrats net
funckey h hilight
funckey H dehilight
自定义特殊功能键
alias F2 spin
alias SF2 angle 45
F2用于布局阶段,调整角度,旋转。
alias F3 copy
alias SF3 zcopy shape
F3用于常用的复制功能。
alias F4 spread between voids
alias SF4 resize_respace_dp
F4用于修线功能。
alias F5 assign color
alias SF5 color192
F5用于颜色显示功能。
alias F6 done
alias SF6 complete
F6保持原样,用于确认功能。
alias F7 next
alias SF7 next
F7保持原样,用于继续功能。
alias F8 oops
alias SF8 oops
F8保持原样,用于撤销功能。
alias F9 cancel
alias SF9 cancel
F9保持原样,用于退出功能。
alias F10 show element
alias F11 cns show
alias F12 shadow toggle
F10用于显示属性。
F11用于显示约束。
F12用于显示单层。
alias SF10 group add
alias SF11 groupedit
alias SF12 group
SF10到SF12用于group相关功能。