Update semantic shortcuts
Update BKeymap::GetModifiedCharacters() to translate a given character and set of modifiers filling out a list of all characters that match for another set of modifiers. This allows us to, for example, get all characters in the normal map that have the '+' character in the corresponding shift map. It is fully generic allowing one to get a list of characters in any map given a character and modifiers of another map. Also I converted from using a BList to using a BObjectList. With this, along with BWindow::HasShortcut(), the semantic shortcuts now work not only with Command+'=', but any key in the normal map that has '+' in it's shift map as long as it isn't already taken by another shortcut.
This commit is contained in:
@@ -12,10 +12,9 @@
|
||||
|
||||
#include <DataIO.h>
|
||||
#include <InterfaceDefs.h>
|
||||
#include <ObjectList.h>
|
||||
|
||||
|
||||
class BList;
|
||||
|
||||
class BKeymap {
|
||||
public:
|
||||
BKeymap();
|
||||
@@ -40,9 +39,9 @@ public:
|
||||
void GetChars(uint32 keyCode, uint32 modifiers,
|
||||
uint8 activeDeadKey, char** chars,
|
||||
int32* numBytes) const;
|
||||
status_t GetModifiedCharacters(const char* normal,
|
||||
int32 modifiers,
|
||||
BList* _modifiedCharacters);
|
||||
status_t GetModifiedCharacters(const char* in,
|
||||
int32 inModifiers, int32 outModifiers,
|
||||
BObjectList<const char>* _outList);
|
||||
|
||||
const key_map& Map() const { return fKeys; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user