Swift使用CGEvent从密钥代码中获取字符

时间:2017-06-06 03:29:17

标签: swift3 cgeventtap

我有一个密码:

let keycode = event.GetIntegerValueField(.keyboardEventKeycode)

有没有办法将其翻译成角色?

func keyboardGetUnicodeString(maxStringLength: Int, actualStringLength: UnsafeMutablePointer <Int>?, unicodeString: UnsafeMutablePointer <UniChar>?)

这似乎是我需要的,但它看起来很吓人!有人可以解释如何从swift调用该函数吗?谢谢!

1 个答案:

答案 0 :(得分:0)

public interface CandidateappearagainstadvtcodeEntityRepository extends JpaRepository<CandidateappearagainstadvtcodeEntity,Long> {

    @Query("select c from CandidateappearagainstadvtcodeEntity c where c.studentmasterid=?1")
    List<CandidateDetailsInfo> findAllByStudentmasterid(String masterId);

}