# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1626126672 0 # Node ID 592f3003f8532eb395a75b05addd78b2530ac731 # Parent cc5013e626f78f9afb91633cd83bac5c9363ce8c iOS: Switch to using UIKeyCommand for menu items so we can use they keyboard accelerators if there is a hardware keyboard. Also add "..." to submenus. diff -r cc5013e626f7 -r 592f3003f853 ios/dw.m --- a/ios/dw.m Sun Jul 11 21:41:44 2021 +0000 +++ b/ios/dw.m Mon Jul 12 21:51:12 2021 +0000 @@ -656,7 +656,7 @@ @end API_AVAILABLE(ios(13.0)) -@interface DWMenuItem : UICommand +@interface DWMenuItem : UIKeyCommand { BOOL check, enabled; unsigned long tag; @@ -1572,7 +1572,10 @@ } } if(title) - menu = [UIMenu menuWithTitle:title children:menuchildren]; + { + menu = [UIMenu menuWithTitle:title image:[UIImage systemImageNamed:@"ellipsis"] identifier:nil + options:0 children:menuchildren]; + } else { if(@available(iOS 14.0, *)) @@ -7619,6 +7622,8 @@ item = [[DWMenuItem commandWithTitle:nstr image:nil action:@selector(menuHandler:) + input:[NSString stringWithUTF8String:accel] + modifierFlags:UIKeyModifierCommand propertyList:nil] autorelease]; /* Don't set the tag if the ID is 0 or -1 */ if(itemid != DW_MENU_AUTO && itemid != DW_MENU_POPUP)