[Vm-dev] Return key in iOS?
bert at freudenbergs.de
Wed Dec 22 10:01:18 UTC 2010
On 22.12.2010, at 02:31, Casey Ransberger wrote:
> So I have been hacking a bit in iOS land. I looked at Bert's Etoys example and ultimately settled on a similar approach to making the keyboard visible. Everything is more or less golden, except that the return key doesn't do anything. Smalltalk methods look funny all on one line:/
> It's quite likely something I'm doing wrong in Cocoa land, but it occurs to me that the return key might be putting linefeeds into whatever text input buffer is there, and that might explain why Squeak isn't advancing to the next line.
> Is this a known issue?
> Casey Ransberger
This was in one of the patches I sent to John a couple months ago:
Index: platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m
--- platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m (revision 196)
+++ platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m (working copy)
@@ -231,6 +233,10 @@
options: 0 range: picker remainingRange: NULL];
+ // LF -> CR
+ if (macRomanCharacter == 10)
+ macRomanCharacter = 13;
evt.pressCode = EventKeyDown;
BOOL isUppercase = [[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember: unicode];
evt.modifiers = isUppercase ? ShiftKeyBit : 0;
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev