Issue 3748 in pharo: The Dark Side of Pharo: Keyboard Inputs

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

Issue 3748 in pharo: The Dark Side of Pharo: Keyboard Inputs

pharo
Status: New
Owner: ----

New issue 3748 by [hidden email]: The Dark Side of Pharo: Keyboard  
Inputs
http://code.google.com/p/pharo/issues/detail?id=3748

It seems that handling keyboard events is more or less random in pharo.

These are the properties of the KeyboardEvent for different inputs under  
OSX:

Cmd-home:  [keystroke '<Cmd-home>'] keyVal=1   keyCode=1   scanCode=115  
buttons=64 cmd=true  ctrl=false
Ctrl-home: [keystroke '<Cmd-home>'] keyVal=97  keyCode=1   scanCode=115  
buttons=64 cmd=true  ctrl=false ???
Cmd-a:     [keystroke '<Cmd-a>']    keyVal=97  keyCode=97  scanCode=0    
buttons=64 cmd=true  ctrl=false
Ctrl-a:    [keystroke '<Cmd-home>'] keyVal=97  keyCode=1   scanCode=0    
buttons=64 cmd=true  ctrl=false ???
Alt-a:     [keystroke '<Opt-å>']    keyVal=140 keyCode=229 scanCode=0    
buttons=32 cmd=false ctrl=false

Under Ubuntu:

Cmd-home:  NOT WORKING! (maybe virtualbox issues...)
Ctrl-home: [keystroke '<Cmd-home>'] keyVal=97  keyCode=1   scanCode=97  
buttons=64 cmd=true  ctrl=false
Cmd-a:     NOT WORKING! (maybe virtualbox issues...)
Ctrl-a:    [keystroke '<Cmd-a>']    keyVal=97  keyCode=97  scanCode=97  
buttons=64 cmd=true  ctrl=false
Alt-a:     [keystroke '<Cmd-a>']    keyVal=97  keyCode=97  scanCode=97  
buttons=64 cmd=true  ctrl=false ???


Under Windose:

Cmd-home:  NOT WORKING! (maybe virtualbox issues...)
Ctrl-home: [keystroke '<Cmd-home>'] keyVal=97  keyCode=1   scanCode=97  
buttons=64 cmd=true  ctrl=false
Cmd-a:     NOT WORKING! (maybe virtualbox issues...)
Ctrl-a:    [keystroke '<Cmd-home>'] keyVal=97  keyCode=1   scanCode=65  
buttons=64 cmd=true  ctrl=false???
Alt-a:     [keystroke '<Cmd-a>']    keyVal=97  keyCode=97  scanCode=65  
buttons=64 cmd=true  ctrl=false ???

---- I am your father Luke! ----

Several problems can be identified here:

1. There is no clear platform distinction between cmd and ctrl
2. missing support for meta (command under OSX)  and alt under win/unix  
prohibits extended shortcuts
3. unification of different keyboard events under the same platform. which  
is undone for instance for ctrl-a and cmd-a under OSX select the whole  
text, although the input keyboardEvent shows no distinction in  
ctrlKeyPressed and cmdKeyPressed!


Fix requires several steps:

1. fix the VM to forward clearly distinct keyboard events for ctrl and  
meta/command and alt
2. Unify the keyboard inputs on all three platforms, the inputs right now  
are unbearable and obey to obscure rules!
3. adapt the UI keyboard event handling to not rely on the internals of the  
keyboard event but a nice API
4. provide system dependent firstCommandKeyPressed and  
secondCommandKeyPressed in order to avoid the following ugly checks all  
over the system
      (aKeyboardEvent commandKeyPressed and: [ aKeyboardEvent  
controlKeyPressed ])

---- may the force be with you ----


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3748 in pharo: The Dark Side of Pharo: Keyboard Inputs

pharo
Updates:
        Status: Accepted

Comment #1 on issue 3748 by [hidden email]: The Dark Side of Pharo:  
Keyboard Inputs
http://code.google.com/p/pharo/issues/detail?id=3748

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3748 in pharo: The Dark Side of Pharo: Keyboard Inputs

Guillermo Polito
Ahhh, I found that diffs between an ubuntu linux and a windowz but don't have time to dive there yet.  I don't know if it's a VM problem, because squeak has the same problems AFAIK.

On Wed, Feb 23, 2011 at 10:44 AM, <[hidden email]> wrote:
Updates:
       Status: Accepted

Comment #1 on issue 3748 by [hidden email]: The Dark Side of Pharo: Keyboard Inputs (No comment was entered for this change.)