code: func DeduceKeyInfo(state uint16,
  	detail xproto.Keycode) (uint16, xproto.Keycode) {
  
  	mods, kc := state, detail
  	for _, m := range xevent.IgnoreMods {
  		mods &= ^m
  	}
  	return mods, kc
  }
docs: // DeduceKeyInfo AND's the "ignored modifiers" out of the state returned by
  // a Key{Press,Release} event. This is useful to connect a (state, keycode)
  // tuple from an event with a tuple specified by the user.