You'll probably have to use gui scripting which means the application will have to be open. I tried this with Safari. If you look under the "File" menu, the 6th menu item is the "Close Window" menu item which has a keyboard shortcut of shift-cmd-w. I targeted that one to see if I can get it...
tell application "System Events"
tell process "Safari"
-- get the menu bar items from the main menu
tell menu bar 1
set menuBarItems to menu bar items -- apple menu, application menu, file menu etc.
end tell
-- get the menu items from a menu bar item
set fileMenuBarItem to item 3 of menuBarItems -- the file menu
tell menu 1 of fileMenuBarItem -- you have to have "menu 1" here
set menuItems to menu items
end tell
-- query the menu bar item
set closeWindowMenuItem to item 6 of menuItems -- close window menu item
tell closeWindowMenuItem
return {name, value} of attributes
end tell
end tell
end tell
If you look at the results, there's a couple interesting attributes of that menu item. It has the "AXMenuItemCmdChar" attribute which gives me the "w" of the keyboard shortcut. Therefore we know that "cmd-w" is part of the shortcut. Another attribute called "AXMenuItemCmdModifiers" exists with a value of 1. That must be the shift character.
So it seems you can work it out. That's all I did so you'll have to look at this more and decide if any other attributes are needed. You'll also need to add repeat loops so you loop through every menu item.
One thing I noticed... if you open the file menu and press the "option" key you'll notice the menu items change. Those changed menu items are also present when you get the menu items of a menu bar item. So you can't always see the menu items you will get.