From 1e162f3564ad2bf69601a25be1d49acb9f35d7c7 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 14 Apr 2019 19:38:47 -0600 Subject: [PATCH] Make Apple-Delete shortcut for deleting file. Fixes #150 --- RELEASE-NOTES.md | 3 ++- desktop/desktop_main.s | 12 ++++++++++++ docs/Keyboard_Controls.md | 7 ++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5d187ad..c5651c6 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -23,6 +23,7 @@ https://github.com/inexorabletash/a2d/issues * GS/OS filenames (supported by ProDOS 2.5) are shown with correct case. (#64) * Tip about skipping copy to RAMCard is shown during startup. (#140) * Apple-` or Apple-Tab keypress cycles through open windows. (#143) +* Apple-Delete deletes selected files. (#150) ### Desk Accessory Enhancements @@ -44,7 +45,7 @@ https://github.com/inexorabletash/a2d/issues * Eyes * Eyes that follow the mouse. (#53) * Screen Saver - * Homage to Jack Eastman's classic. More to come. (#27) + * Homage to the classic After Dark "Flying Toasters" by Jack Eastman. More to come. (#27) Note that several of the new Desk Accessories will not work with older versions of Apple II DeskTop/MouseDesk, due to dependence on new APIs. diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index 14c7769..577affc 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -464,6 +464,9 @@ handle_keydown: : cmp #'X' ; OA-X (Scroll) bne :+ jmp cmd_scroll +: cmp #CHAR_DELETE ; OA-Delete (Delete) + bne :+ + jmp cmd_delete_selection : cmp #'`' ; OA-` (Cycle Windows) beq cycle cmp #CHAR_TAB ; OA-Tab (Cycle Windows) @@ -2514,6 +2517,13 @@ done: jmp redraw_windows_and_desktop ;;; ============================================================ +.proc cmd_delete_selection + copy trash_icon_num, drag_drop_param + jmp process_drop +.endproc + +;;; ============================================================ + .proc cmd_rename_icon jsr jt_rename_icon pha @@ -3806,6 +3816,7 @@ start_icon_drag: lda drag_drop_param beq desktop +process_drop: jsr jt_drop ;; Failed? @@ -3960,6 +3971,7 @@ L5E77: .byte 0 .endproc handle_file_icon_click := handle_file_icon_click_impl::start swap_in_desktop_icon_table := handle_file_icon_click_impl::swap_in_desktop_icon_table + process_drop := handle_file_icon_click_impl::process_drop ;;; ============================================================ diff --git a/docs/Keyboard_Controls.md b/docs/Keyboard_Controls.md index 5834258..f840a5e 100644 --- a/docs/Keyboard_Controls.md +++ b/docs/Keyboard_Controls.md @@ -13,12 +13,13 @@ with the keyboard. * △-G - Resize window; Arrows to resize, Return to finish * △-M - Move window; Arrows to move, Return to finish * △-X - Scroll contents; Arrows to scroll, Esc or Return when done -* △-` or △-X - Cycle through open windows +* △-` or △-Tab - Cycle through open windows ## Icons * △-H - Highlight icon; Left/Right Arrows to navigate, Esc or Return when done * △-A - Select all icons +* △-Delete - Delete selected icons (or eject volume) ## Menus @@ -34,7 +35,7 @@ __File Menu__ * △-A - Select All * △-Y - Copy a File * △-D - Delete a File -* △-E - Eject +* △-I - Get Info * △-Q - Quit __View Menu__ @@ -45,9 +46,9 @@ __View Menu__ * △-L - View By Type __Special Menu__ +* △-E - Eject Disk * △-S - Format a Disk * △-Z - Erase a Disk -* △-I - Get Info __Selector Menu__ * △-0 - Run Selector