mirror of
https://github.com/trudnai/Steve2.git
synced 2024-12-22 06:29:15 +00:00
44968a5db3
- Suports graphics buffer (Page) changes - Supports Mixed mode
55 lines
1.5 KiB
Swift
55 lines
1.5 KiB
Swift
//
|
|
// View.swift
|
|
// A2Mac
|
|
//
|
|
// Created by Tamas Rudnai on 9/18/19.
|
|
// Copyright © 2019 GameAlloy. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
class MonitorView: NSView {
|
|
// override func performKeyEquivalent(with event: NSEvent) -> Bool {
|
|
// return true
|
|
// }
|
|
|
|
// override func keyDown(with event: NSEvent) {
|
|
// print("MV KBD Event")
|
|
// // switch event.modifierFlags.intersection(.deviceIndependentFlagsMask) {
|
|
// // case [.command] where event.characters == "l",
|
|
// // [.command, .shift] where event.characters == "l":
|
|
// // print("command-l or command-shift-l")
|
|
// // default:
|
|
// // break
|
|
// // }
|
|
// // print( "key = " + (event.charactersIgnoringModifiers ?? ""))
|
|
// // print( "\ncharacter = " + (event.characters ?? ""))
|
|
//
|
|
// #if FUNCTIONTEST
|
|
// #else
|
|
// let keyCode = UInt32(event.keyCode)
|
|
// switch keyCode {
|
|
// case eLeftArrowKey:
|
|
// kbdInput(0x08)
|
|
// case eRightArrowKey:
|
|
// kbdInput(0x15)
|
|
// case eLeftArrowKey:
|
|
// kbdInput(0x0B)
|
|
// case eRightArrowKey:
|
|
// kbdInput(0x0A)
|
|
// default:
|
|
// // print("keycode: %d", keyCode)
|
|
// if let chars = event.characters {
|
|
// let char = chars.uppercased()[chars.startIndex]
|
|
// if let ascii = char.asciiValue {
|
|
// kbdInput(ascii)
|
|
// }
|
|
// }
|
|
// }
|
|
// #endif
|
|
//
|
|
// }
|
|
}
|
|
|
|
|