FROM : August Trometer
DATE : Thu Nov 04 17:40:44 2004
While we're on the subject, I'm trying to do exactly the same thing.
I've got my subclass set up, and the keypress events work fine.
However, I'd like the keypress to affect another table (by filling it
with the appropriate data). I'm sure it's a simple process, but I
haven't figured it out. Would someone mind pointing me in the right
direction?
Thanks!
August
On Nov 4, 2004, at 10:46 AM, Todd Ransom wrote:
> This little snippet catches Option-Enter and adds a new row to the the
> tableView. The NSEvent contains the information about modifier keys.
>
> - (void)keyDown:(NSEvent *)event {
>
> unsigned short keyPress = [event keyCode];
> unsigned int flags = [event modifierFlags];
>
> // NSLog (@"%hu", keyPress);
> #pragma mark Option keyPresses
>
> if (flags & NSAlternateKeyMask) {
> if (keyPress == 76 || keyPress == 36) { // option + return or
> enter
> [self addNewRow:self];
> }
> }
DATE : Thu Nov 04 17:40:44 2004
While we're on the subject, I'm trying to do exactly the same thing.
I've got my subclass set up, and the keypress events work fine.
However, I'd like the keypress to affect another table (by filling it
with the appropriate data). I'm sure it's a simple process, but I
haven't figured it out. Would someone mind pointing me in the right
direction?
Thanks!
August
On Nov 4, 2004, at 10:46 AM, Todd Ransom wrote:
> This little snippet catches Option-Enter and adds a new row to the the
> tableView. The NSEvent contains the information about modifier keys.
>
> - (void)keyDown:(NSEvent *)event {
>
> unsigned short keyPress = [event keyCode];
> unsigned int flags = [event modifierFlags];
>
> // NSLog (@"%hu", keyPress);
> #pragma mark Option keyPresses
>
> if (flags & NSAlternateKeyMask) {
> if (keyPress == 76 || keyPress == 36) { // option + return or
> enter
> [self addNewRow:self];
> }
> }
| Related mails | Author | Date |
|---|---|---|
| Salánki Benjámin | Nov 4, 13:23 | |
| Todd Ransom | Nov 4, 16:46 | |
| August Trometer | Nov 4, 17:40 | |
| Will Mason | Nov 4, 18:21 | |
| Todd Ransom | Nov 4, 19:16 | |
| Harilaos Skiadas | Nov 4, 19:41 |






Cocoa mail archive

