You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parsekeyboardevent.m
    path of file: ./repos/spm/external/fieldtrip/private
    
    the code of the file until where you have to start completion: function key = parsekeyboardevent(eventdata)

% PARSEKEYBOARDEVENT handles keyboard events for Windows, Mac OSX and Linux systems.
%
% shift+numpad number does not work on UNIX, since the shift modifier is always sent for numpad events

    
function key = parsekeyboardevent(eventdata)

% PARSEKEYBOARDEVENT handles keyboard events for Windows, Mac OSX and Linux systems.
%
% shift+numpad number does not work on UNIX, since the shift modifier is always sent for numpad events

key = eventdata.Key;
if isunix()
  shiftInd = match_str(eventdata.Modifier, 'shift');
  if ~isnan(str2double(eventdata.Character)) && ~isempty(shiftInd)
    % now we now it was a numpad keystroke (numeric character sent AND
    % shift modifier present)
    key = eventdata.Character;
    eventdata.Modifier(shiftInd) = []; % strip the shift modifier
  end