I remember using 2 stroke bindkey previously in IC5.14. Now I have moved, and currently using IC6.1.5 version Will the state machine or 2 stroke bindkey work?
example of a 2 storke bindkey:
1. Press key<a>,
2. It expects one more key/stroke to complete a bindkey operation
Press key <a> and
if we press <q> - say move
if we press <w> - say copy
<e> - say rotate and so on..
like wise , This is not pressing 2 keys at a time, but one after the other
<q><a> - rotate;
<q><s> - operation2;
I am not sure if I am understandable, Pardon me if I am not. I can explain again.
Given that this is not a standard feature of the tools, it can only have been available by implementing it in SKILL. There's no reason why you couldn't use the same SKILL in IC61X.
I posted an example of how to implement this a while back - see this post.
I expected your reply.Few things,
1. I don't have the code used previously.
2. I saw your post, before posting this and had few questions.
1. I have loaded your script. Initially I saved it in the form of name.il and it did not work due to defun conflicts. Later I read your post carefully and found that I have to save the file with *.ils extention. what is the difference?
2. I have tried an example of F.I.T and nothing happened. I typed f,i,t and there is no reaction from layout viewer. Below is the bindkey I tried.
abSeqBindKey->set("Layout" "fit" "hiZoomAbsoluteScale(hiGetCurrentWindow() 0.9)")
3. I did not get any error while loading or using, just that there is no response to the commands. Can you provide me some examples to verify?
4. You were talking about complex state machines in that post. Did you by any chance try that?
Thanks for your reply,
My guess is that you didn't also call:
You must do this to initialize the system. Without this, any registered key sequences will have no effect - this redefines all the letter and number keys to call this system. That's why you didn't get any errors, because the registered key sequence was never triggered. I did both the initBindKeys and the "fit" definition shown above, and it then worked fine in IC613.
The .ils suffix is required because the code is SKILL++ code; it takes advantage of lexical scoping to allow local functions and data, and this will not work with a .il suffix.
I did not try a "state machine" type approach. I think this would be more complex to implement (at least more complex to maintain and register particular key sequences, potentially).
So would the code listed in your link above also include modifier key functionality?
The reason I ask, is that I'm trying a different keyboard, and I'd like to remap some keys to perform default Cadence bindkey functionality. For example, Cadence default "Shift<m>" gives you Mirror X/Y adjustability inside the move command.
I want the exact same functionality/options based on a Numpad 0(Shift functionality) + Numpad 6 for move.
Could your code be tweaked to yield the desired effect? Is what I want a different issue?
I updated the other post that you appended to, but I see you've given more details in this one.
You could use this selectively, by only defining key bindings on <Key>KP_0 etc. You could define your own function:
defun(CCFnumpadBindKeys (appType) let((appRoot) appRoot=hiGetBindKeyInheritRoot(appType) when(appRoot for(ascii charToInt('\0) charToInt('\9) hiSetBindKey(appRoot strcat("<Key>KP_" intToChar(ascii)) sprintf(nil "abSeqBindKey->enter(\"%s\")" intToChar(ascii)) ) ) ; for hiSetBindKey(appRoot "Shift<Key>KP_0" "abSeqBindKey->enter(\"S\")") hiSetBindKey(appRoot "<Key>Escape" "abSeqBindKey->reset()") ) ; when appRoot ) ; let) ; defun CCFnumpadBindKeys
This defines shift-0 (on they numeric keypad as "S" for shift), and all the others as numbers. So then I can do:
CCFnumpadBindKeys("Layout")abSeqBindKey->set("Layout" '( ("S6" "leHiMove()") ))
Then shift-0 and then 6 will do a move.