techee commented on this pull request.
- along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "keypress.h" +#include "utils.h" + +#include <gdk/gdkkeysyms.h> + +KeyPress *kp_from_event_key(GdkEventKey *ev) +{ + guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_CONTROL_MASK); + KeyPress *kp; + + if (ev->state & mask) + return NULL;
@pcworld Thanks, I've changed the code to return NULL only if ev->state contains Alt (GDK_MOD1_MASK). Should be enough and makes sure some other modifier isn't missed by accident.
Sorry for the force pushes, I didn't assume someone would make pull requests before it's merged. I'll do normal commits from now on so if you want to do more pull requests, there should be no problems now.