Mac keyboard bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac keyboard bindings

Stephan Eggermont-3
Take a look at the Keymapping package.

There is a documentation chapter on the ci server

https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/

Stephan

Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

darrinm
Thanks Stephan. Unfortunately it looks like the problem is deeper. The Home/End (as well as Insert and others) key events don't actually make to the image from the VM. keyUp is received but not keyDown or keystroke. Still looking into why.
Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

darrinm
OK, I have fixed the problem with a patch to the Pharo VM. I cannot claim to understand what is going on with the keyboard handling there but I see what is missing.

Now, how should I go about submitting this patch for inclusion in the VM?

diff --git a/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m b/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
index e63794e..0a1f9fe 100644
--- a/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
+++ b/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
@@ -449,6 +449,11 @@ lastSeenKeyBoardModifierDetails,dragInProgress,dragCount,dragItems,windowLogic,s
     else encode( 27, 53,    cancel:)
     else encode( 27, 53,    complete:)
     else encode( 27, 71,    delete:)
+
+    else encode(  1, 115,   moveToBeginningOfLine:)
+    else encode(  1, 115,   moveToBeginningOfLineAndModifySelection:)
+    else encode(  4, 119,   moveToEndOfLine:)
+    else encode(  4, 119,   moveToEndOfLineAndModifySelection:)
     else return;
       
        @synchronized(self) {
Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

Ben Coman
darrinm wrote:

> OK, I have fixed the problem with a patch to the Pharo VM. I cannot claim to
> understand what is going on with the keyboard handling there but I see what
> is missing.
>
> Now, how should I go about submitting this patch for inclusion in the VM?
>
> diff --git a/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
> b/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
> index e63794e..0a1f9fe 100644
> --- a/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
> +++ b/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
> @@ -449,6 +449,11 @@
> lastSeenKeyBoardModifierDetails,dragInProgress,dragCount,dragItems,windowLogic,s
>      else encode( 27, 53,    cancel:)
>      else encode( 27, 53,    complete:)
>      else encode( 27, 71,    delete:)
> +
> +    else encode(  1, 115,   moveToBeginningOfLine:)
> +    else encode(  1, 115,   moveToBeginningOfLineAndModifySelection:)
> +    else encode(  4, 119,   moveToEndOfLine:)
> +    else encode(  4, 119,   moveToEndOfLineAndModifySelection:)
>      else return;
>        
>         @synchronized(self) {
>
>  
For Pharo, create a new case at pharo.fogbugz.com with (Project=PharoVM,
Milestone=Pharo4.0) (because that is where most attention will be,
although Pharo 3.1 will probably pick up the latest VM with it).  
[pharo-dev] is a better place for VM discussion than [pharo-users], so
post a link to the case there.  Also its also good practice to
cross-post VM discussion to [vm-dev] for the Squeak guys to pick up.

[vm-dev] = http://lists.squeakfoundation.org/mailman/listinfo/vm-dev

You might find this useful...
https://github.com/pharo-project/pharo-vm/blob/master/platforms/unix/doc/README.Contributing
...and you probably should fork that repo and issue a pull request with
your change (and note that fogbugz) - but I haven't done any VM stuff
myself, so others may provide better info.

Thanks for you contribution.
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

darrinm
Thanks for the help Ben. Submitted!
Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

Ben Coman
darrinm wrote:

> Thanks for the help Ben. Submitted!
>
>
>
> --
> View this message in context: http://forum.world.st/Mac-keyboard-bindings-tp4760656p4761232.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>  
Cool.  Now its good practice to end the mail thread with a link to the
issue, since...
* It makes it easier for people to pop over for a quick look and comment
(and maybe you hook someones interest earlier than otherwise)
* Its a lead in for anyone finding the thread in a web search or their
own local mailbox
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Mac keyboard bindings

Ben Coman
Ben Coman wrote:

> darrinm wrote:
>> Thanks for the help Ben. Submitted!
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Mac-keyboard-bindings-tp4760656p4761232.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>>  
> Cool.  Now its good practice to end the mail thread with a link to the
> issue, since...
> * It makes it easier for people to pop over for a quick look and
> comment (and maybe you hook someones interest earlier than otherwise)
> * Its a lead in for anyone finding the thread in a web search or their
> own local mailbox
> cheers -ben
>
>
Sorry Darrin :). I now see that you did that, but my mail filters VM
stuff into a group I hadn't read yet.
 cheers -ben