Shaping,
> additionalAccelerators > ^#(#(#myMethodInTheShell 'CTRL-1') > ) You've used the wrong character as a separator - See AcceleratorTable>>keySeparator You should be using 'CTRL+1' as the string -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
In reply to this post by Shaping-3
Shaping,
> This didn't work because #createSchematicWiring was not sent, because I > neglected to super send it in my Shell's override of > Presenter>>onViewOpened. If you didn't supersend #onViewOpened from your Presenter's #onViewOpened method then that would also explain why your accelerators didn't work. #additionalAccelerators is called from Shell>>onViewOpened. -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
In reply to this post by Shaping-3
Sorry if I led you down the primrose path with my earlier post. We're
talking about an AXControlSite instance, right? So it's likely just consuming all the keyboard input itself (or passing it to the controlDispatch). I had to do something like this many moons ago, but it entailed creating a simple new View subclass. I think in your case, you'll want to experiment with overriding #preTranslateMessage:, possibly even just as a loose method, depending on how your app works. It would ordinarily be simpler, I think, but ActiveX controls are their own odd beasts. HTH, Don "Shaping" <[hidden email]> wrote in message news:[hidden email]... > View>>onKeyPressed: aKeyEvent > "Default handler for a key press event. > Accept the default window processing." > self presenter trigger: #keyPressed: with: aKeyEvent. > ^self defaultWindowProcessing: aKeyEvent > > This method retriggers the event in the presenter, to which I linked in > the Presenter via > > self when: #keyPressed: send: #onKeyPressed: to: self > > Note also that > > Presenter>>onKeyPressed: aKeyEvent > "Default handler for the receiver's view receiving a key press event." > ^self view onKeyPressed: aKeyEvent > > retriggers in the View. > > I have in MyShell an #onKeyPressed: preventing this. Still this method is > not hit. > > > > Shaping > > > |
In reply to this post by Ian Bartholomew-19
Oops. Thanks for the correction. And yes, with the supersend to
#onViewOpened, everything works using #additional accelerators. How then do we use the acceleratorKey field in the VC? Do we need both #additionalAccelerators and this VC field? Do they serve different purposes? Is there a way to distinguish between the left and right Shift, Ctrl, and Alt keys? Shaping "Ian Bartholomew" <[hidden email]> wrote in message news:[hidden email]... > Shaping, > >> additionalAccelerators >> ^#(#(#myMethodInTheShell 'CTRL-1') >> ) > > You've used the wrong character as a separator - See > AcceleratorTable>>keySeparator > > You should be using 'CTRL+1' as the string > > -- > Ian > > Use the Reply-To address to contact me. > Mail sent to the From address is ignored. > |
Also, how do you specify the + key in combination with a modifier key?
'Alt++' and 'Alt+++' don't work. Shaping |
In reply to this post by Shaping-3
Shaping,
> How then do we use the acceleratorKey field in the VC? Do we need both > #additionalAccelerators and this VC field? Do they serve different > purposes? I can't really answer that. Using the VC to add an accelerator key to a menu item works but setting the value is a PushButton's command doesn't. I don't know why it doesn't work (or even if it should) - maybe somebody else has investigated?. The #additionalAccelerators method seems to work as expected though so it's probably just as easy to use that. > Is there a way to distinguish between the left and right Shift, Ctrl, and > Alt keys? I don't think so. If you look at the method Keyboard class>>buildVKeyMap you will find a list of the key names supported by Dolphin - CTRL, SHIFT and ALT only appear once. You may be able to add your own keyboard routines that trap the appropriate codes - that's assuming Windows itself differentiates between the Left/Right versions of the keys. > Also, how do you specify the + key in combination with a modifier key? > 'Alt++' and 'Alt+++' don't work. These should work (assuming your keyboard layout is the same as mine) 'ALT+SHIFT+=' 'ALT+NUM PLUS' -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
Free forum by Nabble | Edit this page |