void IUserInteractive.OnKeyRelease(IPointer cursor, KeyCodes code, SharpMedia.Input.KeyboardModifiers modifiers) { IWidget focus = FocusedWidget; if (focus != null) { focus.OnKeyRelease(cursor, code, modifiers); } }
void IUserInteractive.OnKeyPress(IPointer cursor, KeyCodes code, SharpMedia.Input.KeyboardModifiers modifiers, InputEventModifier eventModifiers) { IWidget focus = FocusedWidget; if (focus != null) { focus.OnKeyPress(cursor, code, modifiers, eventModifiers); } }
protected override void OnKeyPressInternal(IPointer cursor, SharpMedia.Input.KeyCodes code, SharpMedia.Input.KeyboardModifiers modifiers, InputEventModifier eventModifiers) { base.OnKeyPressInternal(cursor, code, modifiers, eventModifiers); // We get child with focus. IWidget childWithFocus = InputRouting.GetChildWithFocus(this, manager); if (childWithFocus != null) { childWithFocus.OnKeyPress(cursor, code, modifiers, eventModifiers); } }
void KeyPress(Area area, IPointer pointer, SharpMedia.Input.KeyCodes code, SharpMedia.Input.KeyboardModifiers modeifiers, InputEventModifier inputModifier) { char chr = InputTranslator.Translate(code, modeifiers); buffer.Append(chr); currentLine.Append(chr); // FIXME: maximum buffer size. if (chr == '\n') { // We signal line read. } }