NSTextField の場合: up_key を押すと、カーソル位置が NSTextField のテキストの先頭に移動します。しかし、カーソル位置を維持する必要があります。始まらない。
私はこのコードを使用しようとします:
-(void)keyUp:(NSEvent *)theEvent
{
[[myTextField currentEditor] moveToEndOfLine:nil];
}
しかし、このコードを介して、カーソル位置が始まりの終わりに移動してから終わりに移動することがわかります。
何か考えはありますか?