查看: 1569|回复: 5

[已经解决] Sion 的 SiNova 如何让小键盘的0 也生效?

[复制链接]
梦石
0
星屑
4385
在线时间
2677 小时
注册时间
2012-3-1
回帖
680
发表于 2023-11-13 16:52:09 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 卡奥尼特 于 2023-11-13 16:54 编辑

先附上原贴
https://rpg.blue/forum.php?mod=viewthread&tid=347535

默认情况下,小键盘的0 担任了默认按键的B键。
当我使用上这个脚本的时候,小键盘0 就没法当做B键使用了。

我需要怎么改呢?
梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2023-11-13 23:17:45 | 显示全部楼层
大概是把SiNova_Input v1.03第29行的0x58, #  X  ->  :B改成0x60, #  0  ->  :B吧?
回复

使用道具 举报

梦石
0
星屑
4385
在线时间
2677 小时
注册时间
2012-3-1
回帖
680
 楼主| 发表于 2023-11-14 00:26:22 | 显示全部楼层
alexncf125 发表于 2023-11-13 23:17
大概是把SiNova_Input v1.03第29行的0x58, #  X  ->  :B改成0x60, #  0  ->  :B吧?

我确实有试过,这样就相当于是覆盖了设置。
相当于是把原本的X键位 ,设置成了小键盘0
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2023-11-14 23:40:59 | 显示全部楼层
哦, 原来是又要x又要0, 那把SionMouseSystem_v3.03第118行之后的3行0x02改成0x02 || 0x60吧?

  def press?(key)
    return true if sion_mouse_press?(key)
    return Input.key_press?(0x01) if key == :C
    return (Input.key_press?(0x02) || Input.key_press?(0x60)) if key == :B
    return false
  end
  def trigger?(key)
    return true if sion_mouse_trigger?(key)
    return Input.key_trigger?(0x01) if key == :C
    return (Input.key_trigger?(0x02) || Input.key_trigger?(0x60)) if key == :B
    return false
  end
  def repeat?(key)
    return true if sion_mouse_repeat?(key)
    return Input.key_repeat?(0x01) if key == :C
    return (Input.key_repeat?(0x02) || Input.key_repeat?(0x60)) if key == :B
    return false
  end
回复 0 1

使用道具 举报

梦石
0
星屑
4385
在线时间
2677 小时
注册时间
2012-3-1
回帖
680
 楼主| 发表于 2023-11-15 14:25:07 | 显示全部楼层
alexncf125 发表于 2023-11-14 23:40
哦, 原来是又要x又要0, 那把SionMouseSystem_v3.03第118行之后的3行0x02改成0x02 || 0x60吧?

  def press? ...

咕,可能有一点我没有说。
我没有使用到里边的鼠标扩展呐。
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2023-11-15 15:48:57 | 显示全部楼层
卡奥尼特 发表于 2023-11-15 14:25
咕,可能有一点我没有说。
我没有使用到里边的鼠标扩展呐。

那就加在SiNova_Input v1.03的底下喽

class << Input
alias_method :sion_mouse_press?,   :press?
alias_method :sion_mouse_trigger?, :trigger?
alias_method :sion_mouse_repeat?,  :repeat?

  def press?(key)
    return true if sion_mouse_press?(key)
    return Input.key_press?(0x60) if key == :B
    return false
  end
  def trigger?(key)
    return true if sion_mouse_trigger?(key)
    return Input.key_trigger?(0x60) if key == :B
    return false
  end
  def repeat?(key)
    return true if sion_mouse_repeat?(key)
    return Input.key_repeat?(0x60) if key == :B
    return false
  end
end

评分

参与人数 1赞 +1 收起 理由
卡奥尼特 + 1 我很赞同

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部