On 28 Aug 2014, at 10:58 , Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:


On 27 Aug 2014, at 9:19 , Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:

I don't remember how the issue ended, or even if it properly ended...
(That's where an issue tracker should shine, but Squeak one is not really used/maintained).

That�s not really a bug in the VM or anything, but a lossy translation from Ctrl -> Shift + Alt in the image�
Only the modifier keys are � modified, while the key character is left unchanged.
Thus, when one uses Ctrl + � (on those layouts where " is its shifted value), the = � ifTrue: [:= "] part is a hack around that, hardcoded to a single layout. 
When using Shift + � , the VM return the keyValue of ", and no translation is needed.

My 2C: Remove the workarounds, as well as the option of translating Ctrl -> Shift + Alt.
In order for it to work *properly* without external hacks, you�d need to implement all keyboard layouts image side, and translate the key character as well as modifier keys. 
The alternative would be to change the VM to include the properly shifted character in each keyboard event, which seems a bit excessive for supporting such a feature. (If such support functions even exist)

Cheers,
Henry


AFAICT, Pharo already removed this option, so removing shiftEnclose: shouldn�t have any nasty lingering side-effects.
It�s a relatively small change as well, I attached the .cs to the existing issue: 
https://pharo.fogbugz.com/f/cases/4646/shiftEnclose-shall-not-hardcode-the-keyboard-layout

Comments like these (from TextEditor >> initializeBasicShiftCmdKeyShortcuts) just make me wince:
"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $("
'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ]. "({< and double-quote"
"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.�

Why would you ever need use command + shift instead of just shift to make those characters? 
I guess Cmd -> Ctrl -> Shift + Alt might be an option in Squeak� but why not just use shift if that�s what you wanted in the first place?

(Full disclosure: on my keyboard layout, '(' is on 8)

Cheers,
Henry