mirror of
https://github.com/trudnai/Steve2.git
synced 2024-12-22 06:29:15 +00:00
70 lines
2.2 KiB
Swift
70 lines
2.2 KiB
Swift
//
|
|
// View.swift
|
|
// Steve ][
|
|
//
|
|
// Created by Tamas Rudnai on 9/18/19.
|
|
// Copyright © 2019, 2020 Tamas Rudnai. All rights reserved.
|
|
//
|
|
// This file is part of Steve ][ -- The Apple ][ Emulator.
|
|
//
|
|
// Steve ][ is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Steve ][ is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Steve ][. If not, see <https://www.gnu.org/licenses/>.
|
|
//
|
|
|
|
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
|
|
//
|
|
// }
|
|
}
|
|
|
|
|