kr580 1.1.0

Desktop KR580VM80 / Intel 8080 emulator.
Documentation
use super::super::{keys::Key, network, printer};

pub(super) fn translate(key: Key) -> Option<&'static str> {
    let value = match key {
        Key::QuickAccess => "Quick access",
        Key::DeviceMonitor => "Show monitor",
        Key::DeviceFloppy => "Show floppy buffer",
        Key::DeviceHdd => "Show HDD buffer",
        Key::DeviceNetwork => "Show network buffer",
        Key::DevicePrinter => "Show printer buffer",
        Key::ViewStackArea => "Show stack memory area",
        Key::MonitorUnifiedScreen => "Screen",
        Key::MonitorTextLayer => "Text layer",
        Key::MonitorPixelLayer => "Graphics layer",
        Key::MonitorHexBuffer => "Byte stream",
        Key::MonitorClose => "Close",
        Key::MonitorDetach => "Detach into a separate window",
        Key::MonitorAttach => "Return to the emulator window",
        Key::MonitorPin => "Keep above other windows",
        Key::MonitorUnpin => "Stop keeping above other windows",
        Key::MonitorViewSplit => "Split",
        Key::MonitorViewUnified => "Unified",
        Key::MonitorClearBuffer => "Clear buffer",
        Key::MonitorSaveImage => "Save image",
        Key::MonitorImageSaved => "Monitor image saved",
        Key::MonitorImageSaveFailed => "Failed to save monitor image",
        Key::MonitorHexFilterAll => "Filter: all",
        Key::MonitorHexFilterGraphics => "Filter: graphics",
        Key::MonitorHexFilterText => "Filter: text",
        Key::FloppyContent => "Floppy buffer contents",
        Key::FloppyImageContent => "Image contents",
        Key::FloppyStatus => "Status",
        Key::FloppyPath => "File",
        Key::FloppyPathMissing => "no file attached",
        Key::FloppyImagePathMissing => "No file attached",
        Key::FloppyBytesQueued => "Bytes queued",
        Key::FloppyClearBuffer => "Clear floppy buffer",
        Key::FloppyShowImageContents => "Show image file contents",
        Key::FloppyOpenImage => "Open floppy image file",
        Key::FloppyDetachImage => "Detach floppy image file",
        Key::FloppySaveBuffer => "Save current buffer to file",
        Key::FloppyDebugBuffer => "Debug buffer mode",
        Key::FloppyImageAttached => "Floppy image attached",
        Key::FloppyImageDetached => "Floppy image detached",
        Key::FloppyDebugEnabled => "debug mode",
        Key::FloppyBufferSaved => "Floppy buffer saved",
        Key::HddContent => "HDD buffer contents",
        Key::HddImageContent => "File contents",
        Key::HddStatus => "Status",
        Key::HddPath => "File",
        Key::HddPathMissing => "no file attached",
        Key::HddImagePathMissing => "No file attached",
        Key::HddBytesQueued => "Bytes queued",
        Key::HddClearBuffer => "Clear HDD buffer",
        Key::HddClose => "Close",
        Key::HddChooseDirectory => "Choose directory",
        Key::HddDebugBuffer => "Debug buffer mode",
        Key::HddDeleteFile => "Delete HDD file",
        Key::HddCreateFile => "Create HDD file",
        Key::HddDebugEnabled => "debug mode",
        Key::HddShowImageContents => "Show file contents",
        Key::HddFileDeleted => "HDD file deleted",
        Key::Network(key) => network::translate_en(key),
        Key::Printer(key) => printer::translate_en(key),
        Key::DeviceStatusReady => "ready",
        Key::DeviceStatusNotReady => "not ready",
        Key::DeviceStatusBusy => "busy",
        Key::DeviceStatusNoData => "no data",
        Key::DeviceStatusConnected => "connected",
        Key::DeviceStatusListening => "listening",
        Key::DeviceStatusDisconnected => "disconnected",
        _ => return None,
    };
    Some(value)
}